- This topic has 18 replies, 5 voices, and was last updated 1 month, 2 weeks ago by
Bobby.
-
AuthorPosts
-
October 30, 2020 at 5:40 pm #1511759
Bobby
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 #1511844Leo
StaffCustomer 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 ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 3, 2020 at 6:59 pm #1517059Bobby
Hi 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 #1517077Leo
StaffCustomer 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 ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 3, 2020 at 11:31 pm #1517177Bobby
Installed 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 #1517223Philipp
I 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 #1517336David
StaffCustomer SupportHi Phillip,
this article explains how to add PHP Snippets such as the add_filter
https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 4, 2020 at 3:30 am #1517404Philipp
Thank 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 #1517463David
StaffCustomer 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 4, 2020 at 4:57 am #1517479David
StaffCustomer 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 );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 5, 2020 at 12:37 am #1518599Bobby
Hi David,
Applied the code.
Now getting itemtype_value 3 ERRORS. Please advise
Link added
November 5, 2020 at 2:04 am #1518670David
StaffCustomer 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
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 6, 2020 at 4:51 am #1520262Bobby
Hi 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 #1521038Tom
Lead DeveloperLead DeveloperHi there,
Our current development version has an option to turn off microdata: https://wpshowposts.com/wp-show-posts-1-2-0/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 6, 2020 at 3:01 pm #1521138Bobby
Hi Tom,
Excellent. When are you expecting to release 1.2.0 prod version ?
-
AuthorPosts
- You must be logged in to reply to this topic.