WordPress.org

Ready to get started?Download WordPress

Forums

Mon Cahier
[resolved] Add comments to the end of posts on main page (6 posts)

  1. Kerry
    Member
    Posted 1 year ago #

    I'd like the option to leave a comment to appear after a post, rather than at the top under the headline as it is currently. Does anyone know where and how to change this?

    The site I'm working with is http://www.planestrainsandplantagenets.com/

  2. Christine Rondeau
    WP Yogi & Forum Moderator
    Theme Author

    Posted 1 year ago #

    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.

  3. Kerry
    Member
    Posted 1 year ago #

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

  4. carriecolemanphotography
    Member
    Posted 1 year ago #

    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() ?>

  5. paulwpxp
    Font hero
    Posted 1 year ago #

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

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    @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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic