|
#1
Feb 20, 2009, 09:58 AM
|
|
I admit, I goofed. At some point I eliminated comments from my posting page. Can't remember. I have been inundated with changes for this site I am doing, and my memory is no good no more!
http://www.midriffrecords.com/midriff_TEST/news
What did I do to get rid of them? Can't figure it out. More important: how do I get them back?
I have added the strings into the "footer" box on the post/page styling, but still, no comments.
Same thing for the byline, also. I'd like to get that back, too.
Sorry about this goofery. Thanks in advance, Flynn! Hope all is well.
|
#2
Feb 20, 2009, 11:37 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
/atahualpa/index.php should look like this at around line 200-245, you might be missing the middle part with "Load comments template"
PHP Code:
<?php // Next/Previous POST Links (on single post pages) if ( is_single() AND strpos($bfa_ata_location_single_next_prev,'Middle')!==false ) { echo '<div class="navigation-middle"> <div class="older' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">'; $bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)) : next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)); echo ' </div>' . ($bfa_ata_home_single_next_prev!= '' ? '<div class="home"><a href="' . get_option('home') . '/">' . $bfa_ata_home_single_next_prev . '</a></div>' : '') . '<div class="newer' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '"> '; $bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)) : previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)); echo '</div> <div class="clearboth"></div> </div>'; } ?>
<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page) if ( is_single() OR ( is_page() && $bfa_ata_comments_on_pages == "Yes") ) { if (function_exists('paged_comments')) { paged_comments_template(); // If plugin "Paged Comments" is activated, for WP 2.6 and older } else { comments_template(); // This will load either legacy comments template (for WP 2.6 and older) or the new standard comments template (for WP 2.7 and newer) } } ?>
<?php // Next/Previous POST Links (on single post pages) // in next_post_link "next" means newer if ( is_single() AND strpos($bfa_ata_location_single_next_prev,'Bottom')!==false ) { echo '<div class="navigation-bottom"> <div class="older' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '">'; $bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)) : next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)); echo ' </div>' . ($bfa_ata_home_single_next_prev!= '' ? '<div class="home"><a href="' . get_option('home') . '/">' . $bfa_ata_home_single_next_prev . '</a></div>' : '') . '<div class="newer' . ($bfa_ata_home_single_next_prev != '' ? '-home' : '') . '"> '; $bfa_ata_next_prev_orientation == 'Older Left, Newer Right' ? next_post_link(bfa_escape($bfa_ata_single_next_prev_newer)) : previous_post_link(bfa_escape($bfa_ata_single_next_prev_older)); echo '</div> <div class="clearboth"></div> </div>'; } ?>
|
#3
Feb 23, 2009, 05:57 PM
|
|
Hi Flynn,
It seems that everything there is largely in order, except...I edited the index.php to display custom widgets, and that seems to be the culprit, although I don't know how to rectify the problem:
http://forum.bytesforall.com/showthr...ht=widget+page
(I have a question regarding this as well, which I will post over there)
Is there a way to massage this so I can get the comments back? I only want them on the "News" page...
http://www.midriffrecords.com/midriff_TEST/news
and not on the Home page.
Thanks!
|
#4
Feb 25, 2009, 10:43 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
To display comments only on one specific page, in this case a page with the "slug" (how page is named in the URL) news, change in index.php, this
PHP Code:
<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page) if ( is_single() OR ( is_page() && $bfa_ata_comments_on_pages == "Yes") ) { if (function_exists('paged_comments')) { paged_comments_template(); // If plugin "Paged Comments" is activated, for WP 2.6 and older } else { comments_template(); // This will load either legacy comments template (for WP 2.6 and older) or the new standard comments template (for WP 2.7 and newer) } } ?>
to this:
PHP Code:
<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page) if ( is_single() OR is_page('news') ) { if (function_exists('paged_comments')) { paged_comments_template(); // If plugin "Paged Comments" is activated, for WP 2.6 and older } else { comments_template(); // This will load either legacy comments template (for WP 2.6 and older) or the new standard comments template (for WP 2.7 and newer) } } ?>
is_page(' XX') with XX = page ID would work as well
|
#5
Feb 25, 2009, 06:48 PM
|
|
Hi Flynn,
Thanks for keeping up with me on this one...I tried this edit, but it still doesn't work.
Is it perhaps a matter of *where* I place the code in the index.php?
|
#6
Feb 28, 2009, 08:58 AM
|
|
As requested, index php attached as zip. It was too long for the body of the post.
thanks!
tony
|
#7
Feb 28, 2009, 11:37 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
I see what might be causing this. If you deleted and re-created the "News" page, or started all over and set up the whole site again, then it's quite possible, even likely, that the ID of the page "News" has changed. From your URL http://www.midriffrecords.com/midriff_TEST/news I can see that the "post slug" or "post name" of the page "News" is news (the part of the URL representing that page). Instead of figuring out the new ID of the "News" page you can also use the slug instead of the ID
In index.php, line 271-272, find
PHP Code:
<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page) if ( is_single() OR is_page('28') ) {
and replace with
PHP Code:
<?php // Load Comments template (on single post pages, and "Page" pages, if set on options page) if ( is_single() OR is_page('news') ) {
|
#8
Feb 28, 2009, 11:55 PM
|
|
Sigh...still didn't work...but boy that sounded like it was it! Any other ideas, Flynn? As a last resort I guess I could just recreate the whole page from the ground up. Thanks a lot for your time, it is truly appreciated!
|
#9
Mar 1, 2009, 01:16 PM
|
|
an update: I set the atahualpha footer, comments, byline, for single pages, and they showed up on all the static pages as well as the news page. so i am slightly confused. is my news page a "page" page, or a "post" page? and perhaps, in light of this development, i perhaps made a mistake somewhere inserting the exception code into my index.php? i feel like i am making some progess, but i am still confused... thanks!
|
#10
Mar 1, 2009, 02:48 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
http://www.midriffrecords.com/midriff_TEST/news is page on which you're displaying posts.
Looks like you made the page /news/ the blog homepage ( is_home() ) and another page the real homepage ( is_front_page() ).
That doesn't explain why there's no comment form on single post pages although the index.php you sent me contains the call to the comment form.
Did you make a single.php? If so I'd need to see that one. It needs to contain the call to the comment form as well. If you made a single.php, then that one will be used by Wordpress for single post pages.
If you did not upload a single.php, do you even have a comments.php at /wp-content/themes/atahualpa/comments.php ?
If yes, do you have this towards the end of functions.php:
PHP Code:
<?php // new comment template for WP 2.7+, legacy template for old WP 2.6 and older if (!function_exists('paged_comments')) { add_filter('comments_template', 'legacy_comments'); function legacy_comments($file) { if(!function_exists('wp_list_comments')) $file = TEMPLATEPATH . '/legacy.comments.php'; return $file; } } ?>
|
#11
Mar 1, 2009, 03:07 PM
|
|
In reverse order of your suggestions:
That snippet of code is at the end of my functions.php
There is a comments.php in the directory you specified.
I have not created a single.php, nor do I know how, but I suspect that is the answer.
I have moved the news page to a new directory, as the site has gone live now...
midriffrecords.com/news
To confirm, yes, 'news' is the blog home page, and home is the site homepage. Thanks!
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
|