New Landing How can we help? Themeforest Theme Support Neighborhood Auto add product attributes selection to wordpress menu

Viewing 12 posts - 1 through 12 (of 12 total)
  • #118915
    profilpr
    Member
    Post count: 9

    Hi I need to use the product attributes as menu links and used the following in my neighboorhood child template functions.php:

    
    /* add product type attributes to the menu selection */
      add_filter('woocommerce_attribute_show_in_nav_menus', 'profil_product_attributes_reg_for_menus', 1, 2);
      function profil_product_attributes_reg_for_menus( $register, $name = '' ) {
        if ( $name == 'pa_produkttyp' ) $register = true;
          return $register;
      }
    

    This code is only adding a specific attribute, but this might be a nice feature to have for auto generation of all attributes available.

    #118917
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    I’m afraid that’s not possible for a theme to provide, it would be something WooCommerce would have to add

    – Kyle

    #118921
    profilpr
    Member
    Post count: 9

    Why not? Simple function in functions.php Seems like a unique peace of awesome to have in a template.

    #118925
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    But you would just add a custom link to the menu for e.g:

    http://neighborhood.swiftideas.net/shop/?filter_brand=232

    – Kyle

    #118928
    profilpr
    Member
    Post count: 9

    Yeah I know but what if I have to explain some customers:
    “Jep that url looks not very good and you need to find the ID to build it.”

    When integrated like in the example above the generated url is clean like http://neighborhood.swiftideas.net/shop/aspesi

    Anyway…was just a hint from me as a customer on how to improve this already pretty awesome template.

    #118933
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Ok thanks

    – Kyle

    #178430
    MarieWorks
    Member
    Post count: 225

    HI Kyle / profilpr

    We’d really like to enable some woo commerce custom attributes as a menu in our theme too – can you tell me where I need to add the code you posted in the functions.php file and do I copy that file out of the neighbourhood theme file and into the neighbourhood-child theme file?

    THanks,

    cC

    #178492
    MarieWorks
    Member
    Post count: 225

    I get this error when I try replacing the adding the edited functions.php file in the child theme folder..?

    Any ideas?

    #178517
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi @MarieWorks

    Not sure what function you’re referring to? The solution I provided was to just add the link for the attribute a a custom link in the menu, for e.g. http://neighborhood.swiftideas.net/shop/?filter_brand=232

    – Kyle

    #178521
    MarieWorks
    Member
    Post count: 225

    Hi @Kyle


    @profilpr
    ’s solution sounded like it generates a cleaner URL – but it seems quite complicated to get working…

    is there anyway of cleaning up the custom urls e.g when the customer goes to page filtered by just bowls url is

    http://107.6.141.74/~reikokan/shop/?filter_product-type=75

    it would be better if we could have

    http://107.6.141.74/~reikokan/shop/bowls

    having read a bit about changing the functions.php file (here http://docs.woothemes.com/document/using-custom-attributes-in-menus/) it should be possible – but I cant seem to make it work…?

    Any ideas?

    Thanks,

    Chris

    #178538
    MarieWorks
    Member
    Post count: 225

    The link solution also loads the generic shop page with a filter already activated (seen screen shot 1) it would be better if we could somehow load a specific page – with relevant heading (as happens when you load category pages – like Vases – screen shot two…)

    Could one way of doing it be just to create lots more categories as use them more like tags – in which case can we prevent the categories being displayed underneath each product on the catalogue pages?

    Thanks

    C

    #178603
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I’m afraid this functionality is more WooCommerce specific, rather than the theme. It’s something you would need to take up with WooCommerce support.

    – Kyle

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register