how to work with parent categories?

WPPizza – A Restaurant Plugin for WordPress Support General Support how to work with parent categories?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9908
    foxpc
    Participant

      Hi,
      i try to figure out how to print parent categories.
      using “navigation Shortcode” it cant be done. if there is any other way to exclude all subcategories and print only parent categories?

      2. how possible to show all subcategories with all the items when clicked on the parent category?
      for example i want to create 3 menus
      pizza
      meat
      alcohol

      i created category pizza, meat, alcohol. then i have created subcategories for each parent category.

      now i want to show to user all the subcategories and all the items based on category.

      * bug the i have found in “wppizza-loop.php”

      <?php if(!is_single() && !isset($noheader) && $termDetails && $the_query->found_posts>0){ /*exclude header if set or is single or <=0 posts */?>

      here you check if there is posts in category, if so, you print the category.
      the problem here is when i create parent category without any items, but this parent category have subcategories with items you still print this parent category.

      i think you need to exclude all parents categories if they have only subcategories.

      #9925
      foxpc
      Participant

        Olly?

        #9926
        Olly
        Admin & Mod

          >if there is any other way to exclude all subcategories and print only parent categories…etc etc

          it’s a normal custom post type, do as you please (or go to appearance -> menu and just do one of those selecting the categories you want.)

          >bug the i have found in “wppizza-loop.php”…

          how is that a bug ? it does do what it is supposed to be doing. only that *you* want it to do something else. in any event, it’s a template, so if you want to it to do different things, feel free to edit as required…

          #9927
          Olly
          Admin & Mod

            there are also some comments in templates/navigation.php maybe those will help . dunno. all depends on your setup and what exactly it is you need to do

            #9963
            foxpc
            Participant

              Hi
              if there is any way to use ids and not names in the wppizza category shortcode?

              [wppizza category=’pizza,pasta’]

              will be

              [wppizza category=’12,14′]

              i am using the same category name for the “lunch menu” and regular menu, in this case it not working.

              Thanks

              #9968
              Olly
              Admin & Mod

                >if there is any way to use ids and not names
                it’s not names, it’s slugs (which are as unique as id’s)

              Viewing 6 posts - 1 through 6 (of 6 total)
              • The topic ‘how to work with parent categories?’ is closed to new replies.