- This topic has 12 replies, 3 voices, and was last updated 4 years, 6 months ago by David.
-
AuthorPosts
-
October 10, 2019 at 4:49 am #1031073Ravi Dixit
I was using this CSS for showing last updated date instead of published date:
.posted-on .updated { display: inline-block; } .posted-on .updated + .entry-date { display: none; }
But now, I have added Page Header for my posts and added Date but my posts are not showing last updated date. It is showing the Published date.
Please help
Thanks.
October 10, 2019 at 5:51 am #1031110DavidStaffCustomer SupportHi there,
you can use the PHP snippet provided here to filter the Header Element date:
October 10, 2019 at 6:14 am #1031128Ravi DixitThanks, David!
It worked…
But the icons before the date(you provided CSS here) is not showing now, Please help…
October 10, 2019 at 6:25 am #1031132Ravi DixitAnd one more issue…
The date is also showing in the starting of post body… See here: https://prnt.sc/phgg1r
I have also added the Comment count(using this) with icons so I am also showing there…
And I also want to align all in a single link, not like this https://prnt.sc/phgial
Can I make its font-size small?
October 10, 2019 at 7:37 am #1031208DavidStaffCustomer Supportthis will align the Comments inline:
.page-header-meta, .page-hero .entry-date { display: inline; margin-left: 5px; }
The shortcode provided for the updated date needs to be wrapped in some HTML
eg.
<span class="entry-date">Shortcode here</span>
October 10, 2019 at 9:57 am #1031433Ravi DixitHello, David!
It worked!
But the date and comments count is also showing in the starting of content. See here: https://prnt.sc/phjsdw
Why is it showing there?
And one off-topic question, How you find CSS selector, I have tried a lot because learning CSS so tried to do it myself but failed.
October 10, 2019 at 1:36 pm #1031581LeoStaffCustomer SupportCan you try disabling the date option in the customizer for single posts?
https://docs.generatepress.com/article/blog-content-layout/#singleAs for finding CSS selector, we use the browser inspector tool. Very useful skill to learn.
October 10, 2019 at 2:25 pm #1031605Ravi DixitYippee! I got removed!
One last thing, How to give space between author to date and date to comments(and also between comment icon to comment count)? See here https://prnt.sc/phnaxx
Because I want to remove “|”.
And How I can learn using Browser inspect tool, can you recommend any resource?
October 10, 2019 at 3:35 pm #1031640DavidStaffCustomer SupportI updated the CSS here:
https://generatepress.com/forums/topic/how-to-last-updated-date-on-page-header/#post-1031208
This adds left margin to both the comment and the date – increase the 5px to whatever space you need.
And to put some space between icon and comments:
.page-header-meta i { margin-right: 5px; }
For Dev Tools and CSS maybe start with googles docs:
October 10, 2019 at 3:58 pm #1031652Ravi DixitHey, David!
Thanks for the help, it worked!
And also for providing the resource.
I can one last issue, I am using this CSS…
body.single .site.container { margin-top: -60px;
It is also making my TOC box up(see here https://prnt.sc/pho6y7), I don’t want it up.
How to do this?
October 10, 2019 at 4:07 pm #1031659DavidStaffCustomer SupportEdit your sticky element CSS to include a margin-top property ie.
#right-sidebar { position: -webkit-sticky; position: sticky; top: 0; margin-top: 60px; /* Add this property */ }
October 10, 2019 at 4:21 pm #1031663Ravi DixitThank you so much, David!
You are guys are awesome, very helpful…
Thanks to all GP Support Team.
You guys inspired me to learn programming…
October 11, 2019 at 5:23 am #1031929DavidStaffCustomer SupportYou’re very welcome – and thats great to hear.
-
AuthorPosts
- You must be logged in to reply to this topic.