how to get PropertyValue working

#3035
  • Resolved Wohnhirsch
    Rank Math free

    by screening your code I saw that there is a function to map remaining attributes as PropertyValue.

    just how to make it fly ?

    Since my product variations differ by width, length and color it would be really nice to have this working ..

    additional question: why is CollectionPage not enabled for product categories?

    cheers,
    Markus

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    You can make use of the following filter to modify any entity and have it return a custom value for any schema type:

    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema_type}", function( $entity ) {
    	return $entity;
    });

    Your second question is however not very clear, is this a custom page or a custom post type? Please share some screenshots so that I can advise further.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Wohnhirsch
    Rank Math free

    Hi Michael,

    thank you ! need to check what i can do with that snippet.

    for my second question i think i found a solution – i dared to modify some of the code in away that i get a CollectionPage including and ItemList output on product categories.

    Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    I am glad that you found a solution to the second question 🙂

    Feel free to reach out should you require additional help on customizing the first code.

    Thank you.

    ​​​​​​

    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 ‘how to get PropertyValue working’ is closed to new replies.