Archived topic
Hi, I want to show "Author/updated date
46 replies · Started by Rahul on February 1, 2021
Hi, I want to show "Author/updated date" below the post title. How can I do that with the "GP theme"?
Hi there,
You can try using the CSS and/or PHP snippets in this brief documentation:
https://docs.generatepress.com/article/show-the-updated-post-date/
I have applied these codes, but it doesn't work. And I want to show Author name and updated date.
Hi there,
you can set the post meta to be displayed in Customizer > Layout > Blog:
https://docs.generatepress.com/article/blog-content-layout/
Theres separate options for Archives and Posts.
Already I enabled all options from these two "Archives + Single" But nothing shows there. You can check the site I attached before.
Already I enabled all options from these two “Archives + Single” But nothing shows there. You can check the site I attached before.
I've checked the site and time elements doesn't seem to have the time strings rendered.
This usually happens when users set a custom format with a syntax issue for the date set under Dashboard > Settings > General.
You can try checking this out if this is the case. Try testing w/ the default time format.
Let us know.
I changed the time format with date, but nothing changed. If you want I can add you to my site for a better investigation.
In your Customizer > Additional CSS you have this rule which is hiding the meta:
.entry-meta {
display: none;
}
Delete that to display the meta.
Yes, it's working now. But before the date, I want to add this text "Last updated on" How can I add this? And the updated date will show on google search?
This doc provides the PHP Snippet for only displaying the last updated date:
https://docs.generatepress.com/article/generate_post_date_show_updated_only/
And to add the Last Updated label before it you would add this snippet:
add_filter( 'generate_inside_post_meta_item_output', function( $output, $item ) {
if ( 'date' === $item ) {
return 'Last updated on ';
}
return $output;
}, 50, 2 );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Those changes will make it so only the last update timestamp is output .... what google does with that data is up to google
Without a plugin can I put those codes? And where should I put in my site?
That document: https://docs.generatepress.com/article/adding-php/ explains the two methods. The alternative to the Code Snippets plugin is to install a child theme:
https://docs.generatepress.com/article/using-child-theme/
And the snippets go in the Child Themes functions.php file.
Hi, I just installed the "Code Snippet" plugin and I opened the "Order snippets by date" But I didn't put any codes in the plugin. Is it right? You can visit the site.
You will need to click Add New and paste the code David provided, then click Save and Activate:
https://www.screencast.com/t/HA4LfT2EzA
https://www.screencast.com/t/xNhsTy5sA
Thank you so much. I have added the code, and still waiting if it really works or not.
However, there is any option to add "Amazon Disclaimer Text" under the post image? You should check the image https://drive.google.com/file/d/1Mta74r1T2s2LnfAtzBFx1iGVq_GeRvOn/view
or you can view the site I attached.