Proper global schema markup setup for custom post types (ACF)

#716807
  • Resolved Kasper
    Rank Math free

    Hi,

    I have a book store that has a product page for physical books, and another product page for audio books. I have a Custom Post Type (using ACF PRO) for each book type.

    An example of an audio book page is this: https://bookpare.dk/lydbog/spionchefen-erindringer-fra-celle-18/

    I have not done anything regarding Schema markup yet, besides activating it in the RankMath settings, and I have also chosen the “Book” within Titles & Metas –> Audio book CPT –> Schema type.

    However, just like my competitor (https://www.saxo.com/dk/spionchefen_lydbog_9788740081510), I need to do proper schema markup for all of my audio books (using ACF field shortcodes so that I don’t have to manually type in ISBN, rating, author, title etc.), so that they contain all relevant information. Can I do this using your schema generator?

    It is important that each schema markup information (ISBN, rating, author, title etc.) is inserted automatically, using the schema generator (if the schema generator can be used to generate a schema template for that is globally applied to eg. my Audio Book Custom Post Type).

    I already tried to change the schema for this specific audio book (https://bookpare.dk/lydbog/spionchefen-erindringer-fra-celle-18/) and I tried to insert my ACF field that contains the ISBN value (look at my photo here: https://imgur.com/a/EVsDhHp). But when I visit the live product page and look at the schema markup, it just returns the shortcode instead of the actual ISBN value… So what’s the solution to this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I apologize for the inconvenience you’re facing with setting up the proper schema markup for your audio books using ACF field shortcodes. Thank you for providing the example of the competitor’s website and the details about your efforts to insert the ACF field containing the ISBN value.

    To set up the proper schema markup for your audio books using ACF field shortcodes, you can indeed use Rank Math’s Schema Generator. This will allow you to create a schema template that can be globally applied to your Audio Book Custom Post Type.

    Here are the steps to use Rank Math’s Schema Generator to set up the schema markup for your audio books:

    1. Navigate to the Schema tab in the Rank Math SEO settings.
    2. Click on Schema Generator.
    3. Click on the Use button next to the Book Schema to open the Schema Builder.
    4. In the Schema Builder, you can add the relevant fields such as ISBN, rating, author, title, etc., using ACF field shortcodes.

    However, based on your description, it seems that the ACF field containing the ISBN value is not being rendered correctly in the live product page’s schema markup.

    To resolve this issue, I recommend reaching out to our support team by assigning this ticket to a human agent using the available buttons. Our support team will be able to assist you further and provide a solution to ensure that the ACF field shortcodes are correctly rendered in the schema markup for your audio books.

    Thank you for bringing this to our attention, and we appreciate your patience as we work to resolve this issue for you.

    If you have any other questions or concerns, please feel free to let us know.

    Sources:
    Book Schema Type » Rank Math
    Configuring “Schema Markup” in Rank Math » Rank Math
    Course Schema Type » Rank Math
    Product Schema Type » Rank Math

    Hello,

    Thank you for contacting Rank Math support.

    You will have to use the %customfield(field-name)% variable to get the values from the ACF fields and add them to the Schema. For example, you can use the %customfield(isbn)% variable for the ISBN field.

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    1. Please make sure that you have set the correct display condition when creating your Schema Templates. You may check this guide to help you further: https://rankmath.com/kb/schema-templates/

    However, please note that this feature is only available for the PRO plan. Can you please let us know how you have created the schema templates from your end?

    2. You can extend your schema using the Advanced schema editor which is also exclusive for the PRO plan.

    If you don’t have the PRO, you can use this filter code instead to extend the schema: https://rankmath.com/kb/filters-hooks-api-developer/#extend-json-ld-data

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

The ticket ‘Proper global schema markup setup for custom post types (ACF)’ is closed to new replies.