Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #387541

    Hi,

    Is there a way to add custom post types and taxonomies (with parent and child categories) to sidebar widgets?

    Thanks

    #387855

    Hey senso!

    Are you trying to display links to some custom post type categories and taxonomies? You can use the “Custom Menu” widget and create a menu in Dashboard > Appearance > Menus for this.

    Cheers!
    Elliott

    #388097

    Hi Elliott,

    Thanks for the prompt support. I have many custom post type categories and taxonomies with parents and childs. I’m not sure if is ok to manually create custom menu for each. Its like I may have to create up to 100s custom menus… and growing.

    When I use the default post type PAGE, it automatically shows the category and sub categories on the sidebar. I would like to do something like that for custom post types and taxonomies. Is there a way to do it?

    #388959

    Hey!

    You don’t need to create custom menu for each custom post type. Create a menu on Appearance > Menus then add the custom post type links there. Now, go to Appearance > Widgets, add the Custom Menu widget. Select the newly created menu with the custom post type links.

    Best regards,
    Ismael

    #389217

    Thanks Ismael and Elliot,

    For example:

    Brand A has 5 products range.
    Each range has 20-30 products.
    Hence the hierarchy is

    <strong>Brand A</strong>
      PRODUCT RANGE ONE 
          - Product type 1
              - Product A
              - Product B
              - Product C
              - and the list go on
          - Product type 2 
              - Product AA
              - Product BB
              - Product CC
              - and the list go on
          - Product type 3
              - Product AAA
              - Product BBB
              - Product CCC
              - and the list go on
     
      PRODUCT RANGE TWO 
          - Product type 1
              - Product A
              - Product B
              - Product C
              - and the list go on
          - Product type 2 
              - Product AA
              - Product BB
              - Product CC
              - and the list go on
          - Product type 3
              - Product AAA
              - Product BBB
              - Product CCC
              - and the list go on

    When Product A is viewed, the sidebar will show

    <strong>Brand A</strong> 
     PRODUCT RANGE ONE 
     PRODUCT RANGE TWO
     PRODUCT RANGE THREE

    Lets assumed there many brands. It seems I have to create many custom menus for different Brands in order to show the relevant products ranges?

    #389717

    Hi!

    You could use this function, http://codex.wordpress.org/Function_Reference/get_taxonomies, to grab the terms and display them (there are code examples in the bottom of the page).

    But I think it would actually be easier to use the custom menu widget and drag the categories over to menus that you create.

    Cheers!
    Elliott

    #389803

    Hi Elliot,
    I’ve tried. Neither solution works. I think it is just not possible to do it on a sidebar. Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Adding custom post types and taxonomies to sidebar widgets’ is closed to new replies.