[OFFER ALERT!] This Halloween, Get Any Premium Theme for Just $19 [GET IT NOW]
Jump to content

[Schema] Adding Custom Schemas to Schema Lite - Considering to get premium theme


jamesking85uk
 Share

Recommended Posts

Hi, 

I have a blog called mudrunlifestyle.com and it's using the Schema Lite Theme. 

I've tried adding "Person" Schema code to the about page using a custom field called "schemamarkup" and added the following code in the header.php file before closing of the </head> tag. 

<?php
$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true);
if(!empty($schemamarkup)) {
  echo $schemamarkup;
}
?>

The schema code publishes fine when I'm logged into the site. However, when I've logged out the site and viewed the following page: https://mudrunlifestyle.com/about/

The "person" schema doesn't show. I've tried removing all caching plugins and no luck. 

My question is with the premium version, can I add as much schemas as I want? I know wordpress has a habit of not showing code due to plugins. If the premium theme will sort this out. I'll order it. Sometimes with WordPress is like trying to find a needle in a haystack with issues. 

Any suggestions, would be appreciated. 

Thanks 

JK

 

 

Link to comment
Share on other sites

Hello,

The issue you described definitely sounds like a cache problem to me (I've seen and fixed thousands of WordPress issues throughout the years). Your code looks correct, and the header.php is a good place for it, among other possible locations.

Caching can also happen on the server-level, so you may want to ask your hosting provider about this. Additionally, you might want to check if there are any "Must Use Plugins" (AKA mu-plugins) installed on your site – you can find those on the Plugins admin page, after clicking on the "Must Use" filter link near the top, where you see All | Active | Inactive etc.

To verify that it is a cache issue, you can try a unique URL that has not been cached before, using query parameters that basically don't change anything, for example http://example.com/?abc=1 
If the issue is related to cache, then your custom code should show up when viewing the source code of such pages.

The premium version of the theme does not add the "Person" structured data automatically, so you would probably have to make the same change there. I recommend checking out our very popular SEO plugin called Rank Math: https://wordpress.org/plugins/seo-by-rank-math/
After setting it up, it will automatically add the "Person" Schema code, along with countless other SEO features. You can use the plugin with any WordPress theme.

Hope that helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...