< All Topics

How to Use Variables and Placeholders in Schema Markup (JSON-LD) Using Schema Package

The Placeholder Feature in Schema Package allows you to use dynamic variables in your JSON-LD schema templates. These placeholders are automatically replaced with post, author, site, or custom field data when the post is rendered. This ensures your schema is automated, flexible, and SEO-friendly without manually entering values for every post.


Supported Placeholders

1. Post-Level Placeholders

PlaceholderDescription
%%post_title%%Post title
%%post_excerpt%%Post excerpt
%%post_content%%Post content
%%post_url%%Permalink
%%post_id%%Post ID
%%post_type%%Post type
%%date_published%%Publish date (ISO 8601)
%%date_modified%%Last modified date
%%featured_image%%Featured image URL
%%image_1%%, %%image_2%%, %%image_3%%Additional images
%%categories%%Categories list
%%tags%%Tags list

2. Author-Level Placeholders

PlaceholderDescription
%%author_name%%Main author display name
%%author_first_name%%First name
%%author_last_name%%Last name
%%author_url%%Author archive URL
%%author_bio%%Author bio
%%author_avatar%%Author avatar URL
%%author_1_name%%, %%author_2_name%%, etc.Multiple authors support
%%author_1_url%%, %%author_2_url%%, etc.Multiple authors URL

3. Site-Level Placeholders

PlaceholderDescription
%%site_name%%Site name
%%site_description%%Tagline
%%site_url%%Home URL
%%site_logo%%Site logo URL
%%site_email%%Admin email

4. Custom / Advanced Placeholders

PlaceholderDescription
%%custom_field_FIELDNAME%%Any post meta or ACF field
%%taxonomy_TAXONOMY%%Terms of a taxonomy (comma separated)
%%meta_KEY%%Any post meta key
%%shortcode_[shortcode]%%Executes a WordPress shortcode and inserts output

Example JSON-LD with Placeholders

{
  "@context": "https://schema.org",
  "@type": "NewsArticle",
  "headline": "%%post_title%%",
  "datePublished": "%%date_published%%",
  "dateModified": "%%date_modified%%",
  "author": [
    {
      "@type": "Person",
      "name": "%%author_1_name%%",
      "url": "%%author_1_url%%"
    },
    {
      "@type": "Person",
      "name": "%%author_2_name%%",
      "url": "%%author_2_url%%"
    }
  ],
  "publisher": {
    "@type": "Organization",
    "name": "%%site_name%%",
    "logo": {
      "@type": "ImageObject",
      "url": "%%site_logo%%"
    }
  }
}

How It Works

  1. Go to your WordPress dashboard.
  2. Navigate to:
    Schema Package → Settings Advanced
  3. Look for the option labeled Dynamic Placeholders.
  4. Enable checkbox
  5. Add your JSON-LD schema using Schema Package
  6. Insert any of the supported placeholders into your schema fields.
  7. When the post is rendered, Schema Package replaces the placeholders with actual dynamic values.

Screenshots References

1. While Mapping

2. While adding Custom Schema markup globally

3. While editing Schema Markup on a particular post

4. While editing Custom Schema on a particular post:


Need help or have questions?
📩 Contact Us
📚 Knowledge Base

Table of Contents