Site logo

Archived topic

Project Site Layout

29 replies · Started by Simon on February 24, 2021

Viewing posts 16–30 of 30

And just looking for gravatar image, Author and number of comments

I can't see the CSS that is provided in the example on your site.

Hi Dave, yeah I keep deleting it because it looks bad and don't want too many people seeing it.

I have readded and will keep it there.

I think it just needs styling now?

The tricky thing might be adding comment counts which could be tricky as it's not showing as a template tag option.

Hello? Please answer. Or at least tell me how to put in a complaint.

I still can't see the CSS provided in that example on your site ie. this:

.page-hero-gravatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    margin: 0 10px 0 0;
}

.page-hero .author, .page-hero-gravatar {
    display: inline-block;
}

.page-hero .entry-date {
    border-left: 2px solid #fff;
    padding-left: 10px;
    margin-left: 10px;
}

Where have you added it ?

Please - if you can afford us a little patience .. we try to respond to all requests within 24hrs. Our average times are significantly below that and when dealing with Custom development requirements we have to balance these very time consuming topics with the rest of our support users.

Sorry David, please forgive me. Just getting frustrating at my own inadequacies, not you. I do appreciate the team and I know it's frustrating when it seems people aren't listening to the advice you've already given.

I am trying to follow, I'm just completely lost, to be honest.

We're nearly there though, here's what it looks like right now after adding the code you sent:

whatitlookslikenow

I think just need to change author name (link) colour and add number of comments, but as I say, that's no template tag for that?

Oh, my mistake, I thought the 2.0 you were referring to was the theme update yesterday...

Adding comments count still isn't working and I can't find out why.

I added the snippet:

snippet

Then added custom field inside page hero:

page hero

Am I missing something?

It's looking amazing now. Thank you!!!

Lastly, you gave this code to stylise the size. I tried changing entry-date to comment-count but must be wrong.

.page-hero-gravatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    position: relative;
    vertical-align: middle;
    margin: 0 10px 0 0;
}

.page-hero .author, .page-hero-gravatar {
    display: inline-block;
}

.page-hero .entry-date {
    border-left: 2px solid #fff;
    padding-left: 10px;
    margin-left: 10px;
}

Last thing, sorry. It doesn't show when 0 comments. Can get it to say '0 comments' when no comments?

0comments

Thank you again :-)

In the shortcode PHP - look for this line:

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

And change it to:

comments_popup_link( __( '0 Comments', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ), 'comment-count' );

You can then target:

.page-hero .comment-count {
    /* your styles */
}

Thanks, 0 comments still not showing though.

Neither before or after adding this:

.page-hero .comment-count {
    border-left: 2px solid #fff;
    padding-left: 10px;
    margin-left: 10px;
}

Hi there,

In your shortcode, try replacing this:

if ( $comments > 0 ) {
    comments_popup_link( __( '0 Comments', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ), 'comment-count' );
}

With this:

comments_popup_link( __( '0 Comments', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ), 'comment-count' );

Right now the if ( $comments > 0 ) is making it so it only displays if there are comments.

Perfect! Thank you! Now I'll leave you all in peace :-)

This archived topic is closed to new replies.