- This topic has 10 replies, 6 voices, and was last updated 5 months, 4 weeks ago by
Elvin.
-
AuthorPosts
-
January 15, 2021 at 6:11 am #1619879
Victor
I am not being able to implement FAQ Schema in GP:
– I followed all the instructions on https://docs.generatepress.com/article/hooks-element-overview/
– I have inserted JSON-LD Code with a HOOK element in wp_footer and ticked “Execute PHP”
– I tried in generate_before_footer as well with the same result
– I have set Display rules for the page I wanted to implement
– Questions/Answers inserted in the JSON-LD code are exactly the same as questions/answers on the page.Google Tool (https://search.google.com/test/rich-results) keeps telling me “Page not eligible for rich results known by this test”.
Could you please tell me what could be going wrong?
Thanks for your support!January 15, 2021 at 7:58 am #1620192David
StaffCustomer SupportHi there,
did you try the
wp_head
hook ?Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 15, 2021 at 8:31 am #1620244Victor
Just tried! Same result.
January 15, 2021 at 11:19 am #1620467Leo
StaffCustomer SupportCouple of things:
– Did you clear your caching plugins or SG optimizer after adding the code?
– Is there any instructions on how this schema should be implemented?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 15, 2021 at 5:37 pm #1620710Marty
Victor, I’ve been using FAQ schema for a while now in GP and have never had an issue as long as it’s validated. I’m using the SOGO Add Script Header Footer plugin which allows adding it to the header easily, so that’s another option you can use.
Are you validating it in the Rich Results Test tool? Invalid schema won’t display.
January 15, 2021 at 6:14 pm #1620749Leo
StaffCustomer SupportThanks Marty 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 17, 2021 at 6:46 am #1622240Victor
Marty, Thanks for your answer. I really appreciate it.
Nevertheless, whenever I have the possibility to use a function from GPP, Generate Blocks, or WP Show Post Pro, I prefer not to install any additional plugin. The combination of that theme with those 2 plugins is amazing! You can do a lot of things! So I try to avoid unnecessary installation of additional plugins.
The Plugin you mentioned is for “adding scripts to each page/post, etc”. I should definitely be able to do it with Elements Module from GPP.
If I cannot do it through Elements Module, then something is not working. That is why I was asking.As I mentioned above I am trying to validate it with Google Tool (https://search.google.com/test/rich-results) keeps telling me “Page not eligible for rich results known by this test”.
January 17, 2021 at 7:38 pm #1622916Leo
StaffCustomer SupportHi Victor,
Can you answer my 2 questions here?
https://generatepress.com/forums/topic/faq-schema-not-working/#post-1620467If I cannot do it through Elements Module, then something is not working. That is why I was asking.
The theme is simply not capable of stopping the code from working if it’s added with the correct method.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/January 17, 2021 at 8:07 pm #1622930Marty
As I mentioned above I am trying to validate it with Google Tool (https://search.google.com/test/rich-results) keeps telling me “Page not eligible for rich results known by this test”.
You need to verify that your schema is valid; you’ve got too many variables because if you’re not sure the schema is even correct, how you can you tell if you have GP set up correctly to use it?
As I was emphasizing earlier, you need to check that it’s valid. Copy & paste it in the Code section of the Rich Results tool. If it’s not valid it won’t be used by Google. If you know it’s valid you can figure out the rest as far as implementation as they’re assisting you with.
I always validate my schema code before adding it to a post, as it only takes a single unsupported character or mistyped character to render it invalid. Those markup lines/errors will be flagged so that you can troubleshoot it.
February 10, 2022 at 7:45 pm #2113637renaissance868
Has the adding the schema via Elements=>Hook option ever worked?
February 10, 2022 at 11:53 pm #2113804Elvin
StaffCustomer SupportHi @renaissance868,
Has the adding the schema via Elements=>Hook option ever worked?
@Marty’s point here stands. If the schema is valid, it wouldn’t matter how it was added in as long as is added to the correct place.
Adding it through Elements > Hook element is the same as adding it manually through PHP code snippet
add_action()
.A wise man once said:
"Have you cleared your cache?" -
AuthorPosts
- You must be logged in to reply to this topic.