Site logo

Archived topic

FAQ Schema not working

10 replies · Started by Victor on January 15, 2021

Viewing posts 1–11 of 11

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!

Hi there,

did you try the wp_head hook ?

Just tried! Same result.

Couple 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?

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.

Thanks Marty :)

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”.

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.

Has the adding the schema via Elements=>Hook option ever worked?

Hi @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().

This archived topic is closed to new replies.