• Hello,
    I need to exclude some categories from the choice and allow the user to select multiple categories.

    is it possible?

    For the first option in my theme I usually use the code “<? Php exclude_post_categories (‘1, 2,3 ‘,’, ‘);?>” But I do not know if it works and where to place it in the plugin.

    For the second option I do not know where to change the code.

    Can you help me?

    Thank you.

    https://www.ads-software.com/plugins/st-category-email-subscribe/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Just found the solution:

    In st-category-email-subscribe.php find the line that starts “if ($showcategory) $return” (should be line 265 in the current version). In this line you’ll see a call to wp_dropdown_categories. In that functions parameter insert “exclude=1,2,3,etc”. If your looking to only show certain categories, replace “exclude” with “include”.

    As for selecting more than one category, you’ll have to change the function to “wp_category_checklist” instead of “wp_dropdown_categories”. This will give you a checklist to chose from instead of the current dropdown.

    Keep in mind, if/when this plugin is updated you’ll have to go back, find this stuff, and change it all over again unless the original dev adds these functionalities.

    This must be a feature! Other than that, this plugin is awesome!

    Agreed, please add this as a feature. Also a sample .csv would be helpful as well. Thanks!

    This is a very good feature.
    I also want to exclude some categories. And a user should allow to select multiple categories.

    Thanks!

    I changed out the dropdown for the checklist and it shows.. just out of the form… has anyone seen this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘exclude some categories from choice & select multiple categories’ is closed to new replies.