WordPress: 6.6.2
PHP: 8.2.24
Bricks: 1.11 + Bricks Child 1.1
URL: Professional Interpretation & Assessment of Psychometric Test Results
Video: https://www.berrycast.com/conversations/c2f36a6a-35cd-59ef-a6f9-ba033941a2ac
Description
I am using the standard accordion element to include multiple FAQs on various pages across the site, pulling from an FAQ CPT using a custom query.
When I switch on the “FAQ schema” the “name” value for the question is pulling from the main page post_title, not the CPT post_title.
The answer “text” value is being pulled correctly from the post_content of the CPT.
Steps to reproduce
- Create an accordion element.
- Apply a query to the accordion, drawing from a custom post type.
- Use the (dynamic) post_title and post_content fields for the title and body of the accordion.
- Turn on the FAQs schema toggle for the accordion.
- Review the schema generated in the underlying page.
Expected behaviour
The name value of the FAQ schema matches the post_title of the CPT included in the query and displayed on the accordion in the h5 in the div with class “accordion-title”.
Observed behaviour
The name value of the FAQ schema matches the post_title value of the main page on which the accordion element is embedded.
Severity: Mild
Frustrating but not breaking visible functionality, only underlying SEO / page schema.