- This topic has 18 replies, 5 voices, and was last updated 3 years, 3 months ago by Bobby.
-
AuthorPosts
-
October 30, 2020 at 5:40 pm #1511759Bobby
Hi Team,
We are using Yoast plugin, I understand yoast also adds schema markup
So do we need to disable GP default schema markup (CreativeWork)? Can we use both
Can you suggest few free tools to test schema markup
October 30, 2020 at 9:14 pm #1511844LeoStaffCustomer SupportHi there,
Our usual recommendation is that if you are adding your own schema, then it’s likely a good idea to disable the GP’s default schema:
https://docs.generatepress.com/article/generate_schema_type/
https://docs.generatepress.com/article/generate_is_using_hatom/I don’t have a specific recommendation for this. If you google “schema markup testing tool” then there should be quite a few options out there.
Let me know if this helps 🙂
November 3, 2020 at 6:59 pm #1517059BobbyHi Leo,
Thanks for that.
Disabled the GP’s default schema. When checked through google structured markup testing tool it still shows CreativeWork. Please advise
November 3, 2020 at 7:31 pm #1517077LeoStaffCustomer SupportSo you’ve added filter code here?
https://docs.generatepress.com/article/generate_schema_type/How are you adding it? Any caching plugins?
Are you sure it’s still coming from GP?
We’ve provided the solution numerous times and it should definitely work 🙂
November 3, 2020 at 11:31 pm #1517177BobbyInstalled GP in our stage server and testing. Send you link privately
Added above code in function.php file.
No cache issues I could think of.November 4, 2020 at 12:41 am #1517223PhilippI adding the php filter code by using a hook element in wp_head.
“creative work” is still showing up.
am I doing it wrong?
thank you
November 4, 2020 at 2:36 am #1517336DavidStaffCustomer SupportHi Phillip,
this article explains how to add PHP Snippets such as the add_filter
November 4, 2020 at 3:30 am #1517404PhilippThank you. I am aware of the adding-php article – and was hoping that I wouldnt have to install another plugin/childtheme just for this feature.
most php needs I could integrate using GP elements just fine – I guess in this case it doesnt work?
November 4, 2020 at 4:37 am #1517463DavidStaffCustomer SupportChanges to core functions such as using the add_filter hook has to be applied before the templates are output. Whereas the Hook Element ( add_action ) is applying that code directly into the two.
Child Themes are generally the best way to go. If not the Code Snippets plugin is the next best bet.
November 4, 2020 at 4:57 am #1517479DavidStaffCustomer SupportHi Bobby,
the schema is coming from the WP Show Post plugin.
Unfortunately theitemtype
is baked into the code. But you can filter its value:add_filter( 'wpsp_defaults', function( $defaults ) { $defaults['wpsp_itemtype'] = 'itemtype_value'; return $defaults; }, 20 );
November 5, 2020 at 12:37 am #1518599BobbyHi David,
Applied the code.
Now getting itemtype_value 3 ERRORS. Please advise
Link added
November 5, 2020 at 2:04 am #1518670DavidStaffCustomer SupportAs i said you cannot remove the schema but you can change its itemtype.
This line of the code:$defaults['wpsp_itemtype'] = 'itemtype_value';
change the
itemtype_value
to whatever alternative itemtype you want instead of the defaultCreativeWork
For example itemtype of
Article
November 6, 2020 at 4:51 am #1520262BobbyHi David,
Tried added below code
add_filter( ‘wpsp_defaults’, function( $defaults ) {
$defaults[‘wpsp_itemtype’] = ‘relatedLink’;
return $defaults;}, 20 );
Because it’s coming from relatedposts
https://schema.org/relatedLink
Google structure markup tool gives error ”
relatedLink (The type relatedLink is not a type known to Google.)”November 6, 2020 at 12:52 pm #1521038TomLead DeveloperLead DeveloperHi there,
Our current development version has an option to turn off microdata: https://wpshowposts.com/wp-show-posts-1-2-0/
November 6, 2020 at 3:01 pm #1521138BobbyHi Tom,
Excellent. When are you expecting to release 1.2.0 prod version ?
-
AuthorPosts
- You must be logged in to reply to this topic.