• Resolved jimboheinz224

    (@jimboheinz224)


    Hi, i have a theme which uses a custom post-type “ht_kb”. How should i refer to its categories in the category-selection field. F.e. the category is named “Team One” the category slug is “team-one” but i can´t set it in the “only categories”-Field.

    Thanks a lot

    • This topic was modified 5 years, 3 months ago by jimboheinz224.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    @jimboheinz224

    The plugin doesn’t yet support custom taxonomies directly from the settings page. Trying to find a smarter way to do it is what eludes me currently but it’s definitely on the list.

    Which option are you exactly setting this in?

    Thread Starter jimboheinz224

    (@jimboheinz224)

    Thank you for your help.

    I tried to set the option in the Widget “Popular Posts”. In “Post types to include:” is a checkbox for the post-type “ht_kb”. But the category-include-function doesnt work.

    I tried it with “ht_kb_category&tag_ID=#” but didnt work as well.

    Plugin Author Ajay

    (@ajay)

    I haven’t tested this code, but I think you could try this to see if this works:

    
    function override_tptn_widget_options( $args ) {
      $args['include_cat_ids'] = '5,6,7';
    }
    add_filter( 'tptn_widget_options', 'override_tptn_widget_options' );
    

    You can pass the Term Taxonomy ID (typically the same as your term ID) for the specific custom taxonomy IDs that you want to limit the top posts to.

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

The topic ‘How to work with custom-posttype categories’ is closed to new replies.