• Resolved sahillayal

    (@sahillayal)


    Hello Sayan,

    I have set up the plugin on the website so the settings as per the plugin instructions Last modified date is showing on a post and on structured data testing tool below the creative work tab as well but when I test the post output after adding the URL on Google, the post is still showing the published date instead of modified date.

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Sayan Datta

    (@infosatech)

    As I am see, your website’s post has datePublished schema markup under CreativeWork section in this results.

    https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fwww.cyclinghacks.com%2Fstages-power-meter-review%2F

    You need to remove datePublished markup from your website. Thanks!

    Thread Starter sahillayal

    (@sahillayal)

    Hello Sayan,

    Thanks for replying and please check the post published in this link on which I am facing last modified issues. Right now it is showing published date and I need last modified date in the post.

    View post on imgur.com

    Plugin Author Sayan Datta

    (@infosatech)

    Hi, you just need to paste this snippet to the end of your active theme’s functions.php file:

    add_filter( 'generate_post_date_output', 'lmt_generatepress_theme_schema_fix' );
    
    function lmt_generatepress_theme_schema_fix( $time_string ) { 
        return str_replace( array( ' itemprop="datePublished"', ' itemprop="dateModified"' ), '', $time_string );
    }

    And then clear your site cache and then let me know.

    Thanks!

    • This reply was modified 5 years, 10 months ago by Sayan Datta.
    • This reply was modified 5 years, 10 months ago by Sayan Datta. Reason: Added Space
    Thread Starter sahillayal

    (@sahillayal)

    Hello Sayan,

    Thanks for replying, I have added the code in function.php but post modified date is not showing in Google. This still shows the published date.

    Please check this link on google.com and help me to show the modified date instead of published date.

    https://www.cyclinghacks.com/stages-power-meter-review/

    Plugin Author Sayan Datta

    (@infosatech)

    Have you added this code to the end of functions.php file?? It may be that you have added but I cannot see any changes on you website.

    Please clear your site cache. Thanks!

    Thread Starter sahillayal

    (@sahillayal)

    Hello Sayan,

    I have added the code to the end of functions.php file and clear my website cache as well but the post is still showing the published date instead of modified date. Please help me how can I resolve this issue.

    Thanks in advance.

    Plugin Author Sayan Datta

    (@infosatech)

    Hi, first of all, if you are using the latest version this of this plugin you do not need to add any code to the end of your functions.php file anymore. So you can delete those code from functions.php file as I have already added this codes from plugin v1.4.6.

    Now you can do one thing, please update it to the latest version ( as I have added some fix to GeneratePress Users some times ago, if you have already updated the plugin to latest version, then please delete this plugin and reinstall it from www.ads-software.com repo and just activate and configure it) and please wait for at least 4-5 days. Google will recognize the dateModified markup and definitely shows the last modified info to the SERPs.

    PS: I can’t see that this plugin is in use here (https://www.cyclinghacks.com/stages-power-meter-review/). If you want to keep showing last modified info to SERPs, you need to keep activate this plugin.

    Thanks!

    I have the same problem. Google only shows the published data. I have the latest version of the plugin and months have gone by (my pages are crawled frequently).. it doesn’t work. Can you help?

    Plugin Author Sayan Datta

    (@infosatech)

    Hi @anefarious1

    What is your website?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Last updated is not showing on search engine’ is closed to new replies.