Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Comments, trackbacks & pings »

I got rid of my comments, but now I want them back


  #1  
Old Feb 20, 2009, 09:58 AM
mactony
 
67 posts · Jan 2009
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  
Old Feb 20, 2009, 11:37 AM
Flynn's Avatar
Flynn
 
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 
' &nbsp;</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' '') . '">&nbsp; '
            
$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 
' &nbsp;</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' '') . '">&nbsp; '
            
$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  
Old Feb 23, 2009, 05:57 PM
mactony
 
67 posts · Jan 2009
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  
Old Feb 25, 2009, 10:43 AM
Flynn's Avatar
Flynn
 
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  
Old Feb 25, 2009, 06:48 PM
mactony
 
67 posts · Jan 2009
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  
Old Feb 28, 2009, 08:58 AM
mactony
 
67 posts · Jan 2009
As requested, index php attached as zip. It was too long for the body of the post.

thanks!

tony
Attached Files
File Type: zip indexphp.txt.zip (3.4 KB, 1859 views)
  #7  
Old Feb 28, 2009, 11:37 AM
Flynn's Avatar
Flynn
 
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  
Old Feb 28, 2009, 11:55 PM
mactony
 
67 posts · Jan 2009
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  
Old Mar 1, 2009, 01:16 PM
mactony
 
67 posts · Jan 2009
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  
Old Mar 1, 2009, 02:48 PM
Flynn's Avatar
Flynn
 
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  
Old Mar 1, 2009, 03:07 PM
mactony
 
67 posts · Jan 2009
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!

Bookmarks

Tags
byline, comments, footer

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting rid of the rel="nofollow" thing in articles (not comments), how? MarkusM. Installing & running WordPress 6 Apr 25, 2010 04:06 PM
[SOLVED] How do I put the post title back in the individual posts back? Paleo Pat Atahualpa 3 Wordpress theme 7 Jul 9, 2009 03:05 PM
I removed the left side bar from my home page, and now want put it back, but can't... nasu Sidebars & Widgets 2 May 24, 2009 03:08 PM
How to get rid ? in url andyhugh Page & Category Menu Bars 2 May 6, 2009 07:25 PM
how to totally get rid of Comments and Reply joe hark Comments, trackbacks & pings 1 Mar 2, 2009 03:44 AM


All times are GMT -6. The time now is 04:42 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.