- This topic has 18 replies, 5 voices, and was last updated 6 years, 6 months ago by Leo.
-
AuthorPosts
-
August 22, 2015 at 9:07 am #131332Aamir
Hey Tom,
I worked on the free version first and then downloaded the premium…it works great.
I was hoping you can help me with one thing, that I want my posts to show modified date and also for the search engines.
My website is http://www.rjaamir.com and currently I have removed the dates. I have updated all the content so it seems justified.
Thanks,
AamirAugust 22, 2015 at 10:00 am #131340TomLead DeveloperLead DeveloperHi there,
So you want the modified date to show to humans, and you want to remove the published date?
Currently it only shows the search engines, while the published date is shown to humans.
Let me know ๐
August 22, 2015 at 10:35 am #131347AamirThanks for the prompt reply.
Yes I want the modified date to be shown to both the humans and the search engine and not the published date.
August 22, 2015 at 12:49 pm #131381TomLead DeveloperLead DeveloperFirst, you’ll want to add this function: https://gist.github.com/generatepress/57ef8336f9afec9bb42a
Then, you’ll want to add this CSS:
.posted-on .updated { display: inline-block; }
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Adding CSS: https://generatepress.com/knowledgebase/adding-css/August 22, 2015 at 10:31 pm #131466AamirThanks a lot ๐
August 22, 2015 at 10:32 pm #131467TomLead DeveloperLead DeveloperNo problem! ๐
August 22, 2015 at 10:56 pm #131475AamirI did as you asked but now it shows both the published and modified date…as shown in the copy below:
10 Hacks to become fluent in English
August 17, 2015August 18, 2015 by RJ Aamir
Answer by RJ Aamir: Iโll share my experience with you that how I became fluent in English: I have had an English medium schooling all through but at my school more emphasis was put on the written part of the language and not so much on the speaking ability. Plus the fact that at โฆ Read moreโฆI am very new this so maybe I did something wrong
August 22, 2015 at 10:59 pm #131476AamirOhhh…I did….its working now…
Thanks anyway ๐
August 22, 2015 at 11:44 pm #131477TomLead DeveloperLead DeveloperGlad you got it working ๐
July 12, 2017 at 11:08 am #348282Myra MingsHello, I followed these instructions and it worked (THANKS!). I do wonder…is there a way to add the prefix “last updated” to appear before the date?
If that would not be a good thing to do for SEO reasons or what not I don’t have to have it. But if it doesn’t make any difference for SEO, I would like to include it. Any ideas?
I’m afraid if I keep messing around with PHP without knowing exactly what I am doing, I am going to break my site, lol! I thought I better ask you!
July 12, 2017 at 12:02 pm #348329TomLead DeveloperLead DeveloperHi Myra,
Give this a shot:
.posted-on .updated:before { content: "Last updated: "; }
BTW, it looks like you’re still using the standalone add-ons. Shoot me an email and I’ll get you set up with GP Premium, as those standalone add-ons are no longer updated: https://generatepress.com/contact/
August 29, 2017 at 2:23 am #375230vemvem6I’m trying to get the modified date and it’s working, BUT I get also the posted date in same line “August 10, 2017August 29, 2017 by John”
How can I remove the “August 10, 2017”?
I put
.entry-meta { display: none; }
but then the entire tag disappears!
August 29, 2017 at 11:32 am #375545LeoStaffCustomer SupportCan you link me to the page? Thanks!
August 29, 2017 at 7:17 pm #375690vemvem6Sure, here: http://bit.ly/2wHzuUp
In my CSS I added:
.posted-on .updated:before { content: "Last updated: "; } .posted-on .updated { display: inline-block; }
In my PHP I added:
add_action( 'generate_after_entry_header', 'tu_page_post_meta' ); function tu_page_post_meta() { if ( 'page' == get_post_type() ) : ?> <div class="entry-meta"> <?php generate_posted_on(); ?> </div><!-- .entry-meta --> <?php endif; }
The effect is:
August 10, 2017Last updated:August 29, 2017
As I mentioned in the other post, if I add an additional line of CSS code:
.entry-meta { display: none; }
then the entire text disappears…
Help very much appreciated Leo! thank you in advance
August 29, 2017 at 7:21 pm #375691LeoStaffCustomer SupportTry this instead:
.entry-date { display: none; }
-
AuthorPosts
- You must be logged in to reply to this topic.