Support » Plugin: Schema & Structured Data for WP & AMP » Feature request: Placement based on post meta key

  • Hi,

    I want to insert structured data of schema type NewsArticle on a WordPress site where some of the posts have paywalled content for paid subscribers.

    This means that for each article, I would need to be able to control whether the advanced schema option “Paywall” is enabled depending on whether is it a free article or premium article.

    At the moment, the website uses the optional post meta key “_is_paid_subscriber” to control whether an individual post is paywalled, in which case it will be displayed in its entirety to paid subscribers who are logged in, otherwise only a portion of the post will be visible.

    To me, it seems the easiest way implement the required capability in the plugin is by adding the Placement option “Post Meta” and entering the post meta key that needs to be present (or absent) in order for the structured data to be generated.

    With this new placement option, I would then create two Schema types:

    • FreeNewsArticle
    • PaywalledNewsArticle

    PaywalledNewsArticle would be configured to add the structured data for NewsArticle with the Paywall option enabled if the post has the post meta “_is_paid_subscriber” present.

    FreeNewsArticle would be configured to add the ordinary NewsArticle schema to posts that do not have the post meta “_is_paid_subscriber” present.

    Perhaps there could be a simpler way to implement what I am seeking, but to me this seems like the most obvious way.

Viewing 1 replies (of 1 total)
  • Plugin Support Sanjeev Kumar


    Which plugin are you using to make paywall content? Or how you are doing that.?

    We will just make a compatibility for that. You do not need to create two seprate schema for that.

Viewing 1 replies (of 1 total)
  • The topic ‘Feature request: Placement based on post meta key’ is closed to new replies.