• Resolved Xaib Aslam

    (@lahorimela)


    Hello, i am new user to your plugin and i saw that you have option to draft the post after last date in jobposting schema. Is it possible that instead of making post to draft, it will remove the schema automatically from the post after the last date.

    Regards

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @lahorimela,

    Thank you for contacting the support.

    You will have to add some code in the functions.php file to make this work.

    First, to not change the post status to draft, you’ll have to disable the Unpublish when Expired option.

    And to remove the Schema data from the outdated JobPosting Schema, you can use the following filter code:
    https://rankmath.com/kb/filters-hooks-api-developer/#extend-json-ld-data

    You’ll have to add this code in your theme’s functions.php file with a condition to return an empty array only when Job Posting has expired.

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Remove schema after last date’ is closed to new replies.