Add blogposting, article schema markup in wordpress without any plugin

REPOST : SML FORUMS
Hi, I don’t use WordPress so much but I know that schema markup plugin available on Android is too messy. Each time we publish a post we have to add all info in it again and it also is shown below our post. as
Even if you hide that div it still load in the background:
I have a fix for each Wordpress user, You can easily add an article or blogposting schema in your post. and also you don’t have to add info in it every time you publish the post.
here how it looks like in structured data testing tool:


You don’t have to add an of above info in this fix. It will automatically extract all info from your post directly.
Add below code in your single.php in wordpress:

Change BlogPosting With Article for article schema

3 Likes

Hi, Thanks for sharing it. I was looking for it. Adding JSON-LD Markup is a good starting point to make a blog SEO-Friendly.

Yeah! I’m using similar code on blogger. The main benefit of this code is that it doesn’t show any error till now

The code that you provided is for “Article” or “Blogposting” schema?

change “Article” With “Blogposting”

1 Like

And for video blog change with… ??? :thinking:

Do you post youtube video?

This plugin has a feature to include Video markup.

It is coming inside Body not in the Head. Please help.

Hi @Paul_Varghese

JSON-LD is valid inside <head> ...</head> as well as <body> ... </body> HTML tag also There is no problem at all. :slight_smile:

You can further test with the help of structured data testing tool.