Schema Type

This topic contains 8 replies, has 2 voices, and was last updated by  Guust 4 years, 8 months ago.

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

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #503415

    Robert Davenport
    Buyer
    Post count: 609

    Hi,

    We are in the process of adding Categories & Subcategories and noticed that there is a dropdown selection for “Schema Type”. It’s defaulted to “Local Business” and we do not see the option for “Musician”. How can we add new Schema Types to select for the specific categories we’re adding?

    Select the schema to use for this category

    Schema Type

    Thank you!
    Robert

    #503425

    Guust
    Moderator
    Post count: 29970

    Hi Robert, to include another schema, you can use the code provided here:
    https://wpgeodirectory.com/support/topic/schema-type-for-custom-post-type-what-is-schema-type/page/3/#post-122410

    Thanks

    #503447

    Robert Davenport
    Buyer
    Post count: 609

    Hi Guust,

    What does this code get added…?

    Thank you,
    Robert

    #503456

    Guust
    Moderator
    Post count: 29970

    Have another look at the link:

    create a file called add_new_gd_schema.php in wp-content/plugins with this code in it

    Thanks

    #503490

    Robert Davenport
    Buyer
    Post count: 609

    Ok, will do Guust!

    In the meantime, we are using the v2 Supreme Directory theme and I don’t see where you have a child theme available for this particular theme.

    What is your recommendation on using a child theme for the v2 Supreme Directory theme so that we do not loose any of our customizations?

    Thank you,
    Robert

    #503491

    Robert Davenport
    Buyer
    Post count: 609

    Hi Guust!

    So I added a new file called add_new_gd_schema.php in wp-content/plugins using Filezilla FTP and copied the following code snippet you provided in your example located here: https://wpgeodirectory.com/support/topic/schema-type-for-custom-post-type-what-is-schema-type/page/3/#post-122410 and saved it and refreshed my cache in Google Chrome and even opened up a new browser login in FireFox and when I navigate to the “Place” categories, I’m not seeing the new schema for Product or Offers.

    <?php
    /*
    Plugin Name: Add new GD Schema
    Plugin URI: https://wpgeodirectory.com/
    Description: This plugin adds new category Schemas to GeoDirectory Categories.
    Author: GeoDirectory Team
    Author URI: https://wpgeodirectory.com/
    License: GPLv2 or later
    */

    add_filter(‘geodir_cat_schemas’, ‘add_new_schema’,10,1);
    function add_new_schema($schemas){
    //add new schemas
    $schemas[‘Product’] = ‘Product’;
    $schemas[‘Offer’] = ‘Offer’;
    ksort($schemas);// sort array a-z
    return $schemas;
    }

    Please explain how to make this work…?

    Thank you,
    Robert

    #503503

    Guust
    Moderator
    Post count: 29970

    Have another look at the link:

    Activated the plugin …

    Let us know. Thanks

    #503557

    Robert Davenport
    Buyer
    Post count: 609

    I see the plugin now…

    That worked!

    Thank you!!!

    #503586

    Guust
    Moderator
    Post count: 29970

    You’re welcome 🙂

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

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

Open Support Ticket