Price Range Schema

This topic contains 4 replies, has 2 voices, and was last updated by  Stiofan O’Connor 6 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #433895

    Joy
    Buyer
    Post count: 1076

    Is it possible to use a custom field to populate the schema price range details? Thank you.

    #433922

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You could do something with hooks but we plan to add something to v2, the problem is there is no proper set standard.

    Stiofan

    #434207

    Joy
    Buyer
    Post count: 1076

    Is there any snippet for this available? Thank you.

    #435400

    Joy
    Buyer
    Post count: 1076

    Hi again. Just checking in. Is there a snippet available to add in the pricing schema to GD V1?

    #435471

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Not tested but somthing like this: (assuming you add a field with htmlvar_name “price_range”, i would make it a select input with values “Select Price Range/,$,$$,$$$,$$$$”

    
    
    add_filter('geodir_details_schema','_my_geodir_details_schema',10,2);
    function _my_geodir_details_schema($schema,$post){
        if(!empty($post->geodir_price_range)){
            $schema['priceRange'] = esc_attr($post->geodir_price_range);
        }
        return $schema;
    }

    Stiofan

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount