Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hide subcategories (widget)

Discussion in 'Plugins and Hacks' started by potski, Dec 17, 2016.

  1. potski

    New Member

    Joined:
    Dec 17, 2016
    Messages:
    2
    Likes Received:
    0
    Hi guys,

    So I have a widget which consits of parent categories and sub categories. It has the option to hide categories from it.
    The list with options to hide consist of both categories and subcategories. Now, the problem is, if I tick any parent category then all subcategories of that category will automatically be shown also. Meaning nothing will be hidden if the parent cateogry is selected. If I only tick subcategories without its parent, well then nothing will be shown as its parent isn't ticked.
    Any ideas on how I can hide certain subcategories while still showing its parent category? Clearly something is wrong in the code but I haven't figured out what.

    I atttached widget.php and category.php in the zip. Anything looking wrong in the widget PHP? I haven't played around with category.php as I am not sure if it needs some adjustments?

    Hope someone can help!

    Thanks in advance!
     

    Attached Files:

    • php.zip
      File size:
      5.6 KB
      Views:
      3
    #1
    Last edited: Dec 18, 2016
  2. potski

    New Member

    Joined:
    Dec 17, 2016
    Messages:
    2
    Likes Received:
    0
    #2
    Last edited: Dec 18, 2016

Share This Page

Web Hosting