landing page to show recent post with comments, wordpress.com example

  • evelyn

    #348

    Hi,

    I quickly found a theme and made a site that shows the recent post when you call it up with comments accessible by a little icon.

    http://matthewblom.wordpress.com/

    I have been trying to do this with my wordpress.org site and maybe you can tell me what I’m doing wrong? It seems like this is a pretty normal way for a wordpress blog to be.

    thank you! Should I be able to do this also with your theme?

    Thank you!

    Evelyn

    evelyn

    #12212

    Hi there,

    I found this comment on a forum:

    you can add this to the template for the home page.

    I’m not sure if I should put this into the index.php file for

    graphene, or into another file? any suggestions so that the

    change won’t be lost with upgrades?

    thanks,

    Evelyn

    <?php

    $withcomments = 1; // force comments form and comments to show on front page

    comments_template();

    ?>

    Admin

    Syahir Hakim

    #12213

    Hi evelyn,

    The theme is showing the link to comments in the front page by default. But it probably doesn’t if you use a static front page..

    Hurm..if you wanna force the comment to be shown, just add this code into your child theme’s functions.php:

    function graphene_force_comment(){
    $withcomments = 1; // force comments form and comments to show on front page
    comments_template();
    }
    add_action('graphene_bottom_content', 'graphene_force_comment');

    Note that this code is untested, and it assumes that the code you provide above works.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!