• Resolved GregF

    (@gregf)


    Hi. I’m using the [cn_multi_category_search] plugin to display child categories in search drop downs and I’d like to hide those that are empty. This is my full shortcode:

    [cn_multi_category_search category='3|Show All|Search by Region|Searching by Region: %s,2|Show All|Search by Specialty|Searching by Specialty: %s' enable_zipcode='true' radius_options=' 20:20 Miles|50:50 Miles|100:100 Miles|200:200 Miles']

    Thanks.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Steven

    (@shazahm1hotmailcom)

    Sorry, but there is not a shortcode option to hide the empty categories.

    I can provide some direction if you do not mind making a minor edit to the shortcode PHP code.

    Please let me know.

    Thread Starter GregF

    (@gregf)

    Yes, please provide the code. Is this something that will be overwritten by updates? Thanks.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Edit the plugins PHP code. Go to line 406. It should be this:

    'hide_empty'         => FALSE,

    Change FALSE to true.

    Save the change.

    This change will get overwritten on updates to the beta advanced search add-on. In a future update, I’ll make sure to add this as a shortcode option.

    I hope this helps; please let me know.

    Thread Starter GregF

    (@gregf)

    Thanks, that worked great. Hopefully, I’ll remember to revisit it when the plugin gets updated.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Add hide_empty_categories=true to the shortcode. That way, when an update is released and applied, you will not have to make any edits again. … I’ll add support for this option so it will be included.

    I hope this helps; please let me know.

    Thread Starter GregF

    (@gregf)

    Perfect! I love future-proofing. Thanks for quickly solving this problem.

    Plugin Author Steven

    (@shazahm1hotmailcom)

    Hapy to help; have a great weekend!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Hide empty categories in drop down’ is closed to new replies.