Site logo

Archived topic

Entry Meta all on one line with author gravatar

4 replies · Started by scott doel on December 1, 2018

Viewing posts 1–5 of 5

Hi all,

I have followed the tut Entry Meta Style Documentation tutorial and it looks good, also CSS sligtly modified to show thw comment bubble (just removed .comments-link:before {display: none;}.

There are a couple of things I would like to change
1. When there is a comment left, the leave a comment disappears. Can it stay there and show the number of comments?
2. Add an icon before to the date
3. Directly below (as a second line) move categories and tags from the bottom, both with icons before
4. Then add Estimated Reading Time as per the support topic with a clock icon before

I am then using SEOPress breadcrumbs with the below snippet

//SEOPress breadcrumbs
add_action( 'generate_after_content','sugp_breadcrumbs' );  
function sugp_breadcrumbs() { ?> 
    <?php if ( function_exists('seopress_display_breadcrumbs') && is_single() ) : ?>
<?php if(function_exists('seopress_display_breadcrumbs')) { seopress_display_breadcrumbs(); } ?>
<?php endif; ?>
<?php }

But would like to style this and have them display as the third line of entry meta with a home icon if poss

Hope this makes sense and please see test post

1. In your custom function, find this:

comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) );

And replace it with:

comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment - Leave a comment', 'generatepress' ), __( '% Comments - Leave a comment', 'generatepress' ) );

2. There isn't a date icon in GP by default, but you can add your own/use an image like this:

.posted-on:before {
    content: url( 'URL TO IMAGE' );
}

Or:

.posted-on:before {
    font-family: My Custom Icon Font;
    content: "\my icon code";
}

3. Try this:

add_action( 'generate_after_entry_title', function() {
    ?>
        <header class="entry-meta">
            <?php generate_entry_meta(); ?>
	</header><!-- .entry-meta -->
    <?php
} );

Then add this CSS:

footer.entry-meta .cat-links,
footer.entry-meta .tags-links {
    display: none;
}

4. Did you try the instructions in that topic? They should work for your solution quite easily. However, GP doesn't have a clock icon by default, so you'd need to add that.

5. Not sure what you mean about SEOPress? What exactly do you want them to look like?

Thank I’ll try when I get home and let you know

Thanks all ok

Awesome :)

This archived topic is closed to new replies.