Category Top Description for Custom Post Type

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

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

Open Support Ticket
  • Author
    Posts
  • #442238

    Ann
    Full Member
    Post count: 4

    Let’s say I create a custom post type called “Restaurants” with a slug of /restaurants. Then within that custom post type I create several categories, like Fast Food, Italian, etc.

    When I create those categories I can set a Category Top Description, so when I visit /restaurants/italian it will show a custom description at the top of the page where I can put ads and such.

    But how can I set the Category Top Description for /restaurants itself? I can’t find a setting for that, and it’s the most important place for me to be able to enter custom text.

    If it can’t be done in the current admin panel, what would be the most appropriate hook to use to add my own text to these pages? I’m using Supreme Directory Theme if it makes any difference. I’m hoping for something like:

    
    
    add_filter('geodir_above_cat', 'geodir_above_cat_custom', 10, 1);
    function geodir_above_cat_custom($cat){
      if($cat == THE_RESTAURANT_CAT){
        return 'My category top description text here.';
      }
    }

    Thanks for your help.

    #442252

    Alex Rollin
    Moderator
    Post count: 27815

    Those are set in the Custom Post Type definition

    GeoDirectory – Custom Post Types – Edit – Description

    https://wpgeodirectory.com/docs/custom-post-types-add-on-overview/

    #442261

    Ann
    Full Member
    Post count: 4

    Thanks for the response, I have something entered into the description field for the custom post type, but it doesn’t show anywhere on the front end of the site. I don’t believe it is used in the Supreme Directory theme.

    So there aren’t any hooks for inserting something above the listings on a category page?

    #442267

    Guust
    Moderator
    Post count: 29970

    It should show top left corner of the CPT page, see example at https://wpgeo.directory/supreme-directory/places/

    Thanks

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

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

Open Support Ticket