• Resolved Talha Imam

    (@talhaimam)


    Hello,

    The plugin’s working great on all page except the category/blog pages such as:
    https://www.coaching-place.de/blog/
    https://www.coaching-place.de/blogkategorie/stress/

    The schema is not generated correctly for these pages, the name, description and url are missing in the schema:
    [{"@context":"https://schema.org","@type":"LocalBusiness","image":"https://www.coaching-place.de/wp-content/uploads/2020/12/hypnoji-hypnose-portal-scaled.jpg","address":"?rztehaus im Friedrich Carré, Dorotheenstra?e 56, 10117 Berlin","priceRange":"200 € - 800 €","telephone":"+49 - 30 - 640 755 24","aggregateRating":{"@type":"AggregateRating","ratingValue":5,"reviewCount":1,"bestRating":5,"worstRating":1}}]

    I can’t set a custom name, description and url for the schema because I want them to be generated dynamically using the current page information. How to fix these?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Category pages are index pages, they do not have a page ID and so do not have a page title or page content.

    You’ll probably need to add this information yourself to the schema using the provided hook (see the FAQ and Hooks help pages). WordPress provides functions such as is_archive, is_tax, and is_post_type_archive which you can use to determine which index page you are on and act accordingly.

    Thread Starter Talha Imam

    (@talhaimam)

    Alright I understand. I will probably need to use is_category() and append custom name, description and url to the scehema for these pages.

    Thanks

    Plugin Author Gemini Labs

    (@geminilabs)

    If you have modified the Site Reviews categories to have public index pages, then you will need to use is_tax, the taxonomy name of the Site Reviews category is site-review-category.

    Thread Starter Talha Imam

    (@talhaimam)

    I succeeded in fixing the schema for category pages. However, the schema filter is not getting applied to the blog page: https://www.coaching-place.de/blog/

    We’re using a separate template for this page. I have tried editing the schema for the blog page through many functions but the schema is not getting altered. Is there an override for the blog page?

    Plugin Author Gemini Labs

    (@geminilabs)

    You could try is_home or is_page_template

    Thread Starter Talha Imam

    (@talhaimam)

    I have tried is_page with id and slug, is_home, is_page_template, permalink matching e.t.c. but nothing is working for the blog page.

    It’s as if like the filter I have added in the functions.php file doesn’t get run the last for that specific page. I have also tried changing priority for the add_filter function to no results.

    Does this plugin treat the blog page exclusively?

    Plugin Author Gemini Labs

    (@geminilabs)

    Site Reviews uses the Post ID of the page to generate the schema details that are specific to the page. Archive pages do not have a Post ID.

    What is the reason for using the schema on these pages?

    Thread Starter Talha Imam

    (@talhaimam)

    Client’s requirements.

    So you’re saying I can’t edit the schema for the blog page using this filter:
    ‘site-reviews/schema/LocalBusiness’?

    Plugin Author Gemini Labs

    (@geminilabs)

    No, I’m only saying what Site Reviews was built to do.

    I asked what the purpose was for using the rating schema on the blog page since Google only provides review snippets for specific Schema Types, and the Schema Type should accurately represent what is being reviewed…

    For example, if you are reviewing products, have enabled the schema, and have set the Schema Type to “Product”, then the review snippet should appear in search results for each product page. However, it won’t appear for the shop page because the shop is showing multiple products and the “Product” schema is intended for a specific product page.

    You may need to explain this to your client.

    Thread Starter Talha Imam

    (@talhaimam)

    Yes, I can do that. Thanks

    The reason why they’re pushing it is because Google is throwing an error for index pages in the rich snippets section, obviously.

    Alright, you can mark this thread as closed, I am going to remove the schema from the blog page altogether.

    Thank you for the help

    Plugin Author Gemini Labs

    (@geminilabs)

    Also, Google no longer provides review snippets for the LocalBusiness schema type if they are seen as “self-serving”.

    Read Google’s reasoning here: https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Incorrect Schema Generating for Category Archive/Blog Pages’ is closed to new replies.