This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

How many Comments link on homepage

9 years ago · Last reply by Andrew Misplon 9 years ago

Hi,

on my homepage in the vantage premium theme I have a post loop. But how to add a link under each post to the actual post with comments? And in that link have a counter that says how many comments there are. I see this on many blogs but can’t figure it out

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

4
  1. Andrew Misplon Staff 9 years, 10 months ago

    Hi N1k0_VE

    Apologies for the delay.

    Try adding a

    <!--more-->

    quicktag to each of your posts. This will add the Continue Reading button. For a step by step guide to adding the more tag, please, see: https://en.support.wordpress.com/more-tag/.

    If AppearanceTheme SettingsPost Metadata and AppearanceTheme SettingsPost Comment Count are enabled the number of comments should be displayed under the post title. This assumes you’re using the Blog template in the Post Loop widget or the Blog layout set in Theme Settings if this is your posts page.

  2. N1k0_VE 9 years, 10 months ago

    I appreciate the help. But it’s not what I’m looking for.
    What I have now is this: http://www.ourowncolourfulworld.com/
    You see on the homepage that under every post there is a link with how many comments or leave a comment.
    I did this with a child theme for vantage. with adding “” to the content.php
    What I would want to achieve is something like on this blog: http://madamconfituur.com/
    You see that on the home page under each post that you have a link to the comments with counter and categories tags and author,
    nicely organised in columns.
    How can I do this? I would want the same as on the http://madamconfituur.com/ site.
    My theme is Vantage Premium.

  3. N1k0_VE 9 years, 10 months ago

    After “”adding”” should have posted this code:

    <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'puro' ), __( '1 Comment', 'puro' ), __( '% Comments', 'puro' ) ); ?></span>

    Don’t know why it didn’t post :)

  4. Andrew Misplon Staff 9 years, 10 months ago

    Thanks for explaining further.

    As you’ve guessed and already been working on, adding the items you want will require custom development. We can do our best to advise you on these changes but, unfortunately, don’t provide custom development as part of our support offering.

    An easy way of adding these items would be to add the following to functions.php:

    /**
     * Add post meta to the post footer.
     */
    function vantage_child_post_meta() {
    	if ( comments_open() ) { 
    		echo '<span class="comments-link">';
      		comments_popup_link( __( 'Leave a comment', 'ultra' ), __( '1 Comment', 'ultra' ), __( '% Comments', 'ultra' ) );
      		echo '</span>';
    	}
    	if ( has_category() ) {
    		echo '<span class="cat-links">' . get_the_category_list( __( ', ', 'ultra' ) ) . '</span>';
    	}
    	echo '<span class="byline"><span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" rel="author">' . esc_html( get_the_author() ) . '</a></span></span>';
    }
    add_action( 'vantage_entry_main_bottom', 'vantage_child_post_meta' );

    That’s a really quick look at this. You’d still need to add CSS styling for your new elements. Hope that helps get you started.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread