[Resolved] Hi, I want to show “Author/updated date

Home Forums Support [Resolved] Hi, I want to show “Author/updated date

Home Forums Support Hi, I want to show “Author/updated date

Viewing 15 posts - 1 through 15 (of 47 total)
  • Author
    Posts
  • #1642376
    Rahul

    Hi, I want to show “Author/updated date” below the post title. How can I do that with the “GP theme”?

    #1642671
    Elvin
    Staff
    Customer Support

    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/

    #1642859
    Rahul

    I have applied these codes, but it doesn’t work. And I want to show Author name and updated date.

    #1643225
    David
    Staff
    Customer Support

    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.

    #1643686
    Rahul

    Already I enabled all options from these two “Archives + Single” But nothing shows there. You can check the site I attached before.

    #1643695
    Elvin
    Staff
    Customer Support

    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.

    #1643918
    Rahul

    I changed the time format with date, but nothing changed. If you want I can add you to my site for a better investigation.

    #1644048
    David
    Staff
    Customer Support

    In your Customizer > Additional CSS you have this rule which is hiding the meta:

    .entry-meta {
        display: none;
    }

    Delete that to display the meta.

    #1645415
    Rahul

    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?

    #1645708
    David
    Staff
    Customer Support

    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

    #1645761
    Rahul

    Without a plugin can I put those codes? And where should I put in my site?

    #1645850
    David
    Staff
    Customer Support

    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.

    #1645891
    Rahul

    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.

    #1646002
    Leo
    Staff
    Customer Support

    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

    #1646399
    Rahul

    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.

Viewing 15 posts - 1 through 15 (of 47 total)
  • You must be logged in to reply to this topic.