WordPress.org

Support

Support » Themes and Templates » Mon Cahier » [Resolved] Add comments to the end of posts on main page

[Resolved] Add comments to the end of posts on main page

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Christine Rondeau

    @crondeau

    Volunteer Forum Moderator

    In order to do this, you’ll need to modify the template, so you’ll need to make a child theme. http://codex.wordpress.org/Child_Themes

    Once you have your child theme in place, have a look at the content.php file.
    Make a duplicate and insert in your child them.
    Then take line 16 – 22 out and paste them in between the 2 endif on line 57, 58.

    So look for this:

    <?php endif; // End if $tags_list ?>
    		<?php endif; // End if 'post' == get_post_type() ?>

    and change it to:

    <?php endif; // End if $tags_list ?>
    
    			<?php if ( comments_open() || ( '0' != get_comments_number() && ! comments_open() ) ) : ?>
    
    			<span class="sep"> | </span> 
    
    			<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'mon_cahier' ), __( '1 Comment', 'mon_cahier' ), __( '% Comments', 'mon_cahier' ) ); ?></span>
    
    			<?php endif; ?>
    
    		<?php endif; // End if 'post' == get_post_type() ?>

    Don’t forget to make a child theme though. If you simply make a change to the parent, if and when there’s a release your changes will get overwritten.

    That worked a treat – thank you very much (and thank you for creating the great theme)!

    I just tried doing this in my child theme and nothing is changing. Here’s what I’m looking at in the child theme’s style.css.
    <?php endif; // End if $tags_list ?>

    <?php if ( comments_open() || ( ‘0’ != get_comments_number() && ! comments_open() ) ) : ?>

    <span class=”sep”> | </span>

    <span class=”comments-link”><?php comments_popup_link( __( ‘Leave a comment’, ‘mon_cahier’ ), __( ‘1 Comment’, ‘mon_cahier’ ), __( ‘% Comments’, ‘mon_cahier’ ) ); ?></span>

    <?php endif; ?>

    <?php endif; // End if ‘post’ == get_post_type() ?>

    paulwpxp

    @paulwp

    Font hero

    That code is in content.php, not style.css.

    WPyogi

    @wpyogi

    Forum Moderator

    @carriecolemanphotography – you cannot put PHP in a CSS file – it doesn’t work there :). So take all that out – or it will likely cause CSS problems.

    Reread Christine’s post above – looks like she’s talking about changing the content.php file – in a copy you’ve moved to the child theme.

    If you need additional help, it’s best to start a new thread – as this one is already marked resolved – you can do so here:

    http://wordpress.org/support/theme/mon-cahier#postform

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Add comments to the end of posts on main page’ is closed to new replies.
Skip to toolbar