• Resolved Maggie96

    (@maggie96)


    Hi,

    Is there a way to remove the post date from SERPS? The Yoast plugin only allows me to remove it from the Yoast snippet preview. I have the meta info for dates in Yoast set to “hidden” but Google still pulls dates either from the theme or WordPress files. So I figured I would start with the theme first.

    I’m using the Virtue Child theme – is there code that I can add to the functions.php file or is there CSS that can be added to this theme to prevent Google from pulling the old published post date and showing it in search results?

    We’re updating old posts and have code to show the last updated post date – but the search results only show the original publish date – and some of these were back in 2014.

    I thought if I could block the original publish date from search results – people wouldn’t assume it was an outdated post.

    I hope this makes sense – any advice for the child theme would be helpful ??

    Thank you!!

    Meagan

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • hannah

    (@hannahritner)

    Hi Meagan,
    Check out this tutorial: https://www.andrewkeir.com/remove-wordpress-post-datestamp-timestamp-google-serps/
    Let me know if you have questions!

    Hannah

    Thread Starter Maggie96

    (@maggie96)

    Hi Hannah,

    I saw that post earlier today but was confused buy it because inside the Virtue Child theme I don’t see the files called:

    “index.php”, “single.php” or “archive.php” where the author says to put the code.

    I only see the functions.php file.

    Do you have any idea of where I should place the code inside the child theme?

    Thank you ??

    Meagan

    hannah

    (@hannahritner)

    You would need to copy these files from the parent theme and add them into your child theme.

    Hannah

    Hey,
    So honestly rather then editing/adding files I suggest you just add this into the functions.php file in your child theme:

    remove_action('kadence_single_post_before_header', 'virtue_single_post_meta_date', 20);
    remove_action('virtue_single_post_before_header', 'virtue_single_post_meta_date', 20);

    Ben
    Kadence Themes

    Thread Starter Maggie96

    (@maggie96)

    Hi Ben/Hannah

    I added the code to the functions.php file – thank you. I’m going to assume it takes awhile to take effect?

    If it doesn’t work I’ll try Hannah’s suggestion next.

    Thank you both so much for the guidance – at least I’m on the right path now!!

    Meagan

    hannah

    (@hannahritner)

    Yes, it can take time before it takes effect. But Ben’s code should do the trick for you:)

    Hannah

    So — how long does this take to become effective?

    I note that Meagan’s posts still have the date on them.

    Or am I missing something?

    Thanks.

    hannah

    (@hannahritner)

    Hi Shields,
    It can sometimes take a good 2 weeks for this to become effective.

    Hannah

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Is there a way to remove blog post date from SERPS?’ is closed to new replies.