Quick Post Widget
Hide category selector? (3 posts)

  1. John Davey
    Posted 4 years ago #

    This is what the instructions say, but the category section does not hide itself, even when I have only one category. Can anyone confirm that this feature works for them? If so, then I am doing something wrong.

    How to hide the category selection?
    In the admin panel it is possible to include or exclude certain categories, to choose the categories order and to set a default category. If only one category remains, the default category is the same as the only category and creating a new category is disabled, the complete category section hides itself.


  2. Diogo15
    Posted 4 years ago #

    You must modify the core file..

  3. blackriver
    Posted 4 years ago #

    Are you sure that you are doing it right? Here is the code:

    if ((count($cats) == 1) && ($disable_new_cat == 'yes') && ($cat_default == $cats[0]->term_id)) $showhide_categories = 'hide';
    else $showhide_categories = 'show';

    All you have to do is:
    1. Select 1 category from the category list (include)
    2. Pick default category do be the same category.
    3. Hide new category option.

    It works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic