-
AuthorPosts
-
August 11, 2018 at 2:48 am #996203
Hi,
I understand from other questions that the Woocommerce attribute filter feature will not work on a custom Enfold page. I am trying to get the attribute filters to position above the shop items rather than in the sidebar. I have tried to copy the code from the sidebar and place in the shop page under “text” tab and have tried wrapping in code tag. This will only works if the sidebar is active too. I also tried using the woocommere shortcode [woocommerce_product_filter_attribute] and it doesn’t do anything. I have disabled all plugins and everything is updated.I see other sites that have filters above so I know it can be done. My question is why can’t I use the short code where I want in Enfold or a widget shortcode with filter shortcode? Shouldn’t that work?
If I need to modify a php template to move a the sidebar to top or register another sidebar that’s fine, I am just looking for advice on how to do position the filter above the product grid.
August 11, 2018 at 9:49 am #996244Hey mnoack1,
You could create a custom widget area (Appearance > Widgets – “Enfold Custom Widget Area”). Call the widget area i.e. “Shop Product Filter” (without the quotes) and add your product filter widgets to this area.
Then insert this shortcode to the shop page:
[av_sidebar widget_area='Shop Product Filter']
to display the widget area.
Best regards,
DudeAugust 11, 2018 at 9:03 pm #996339HI Dude,
It worked!
Since this is our 25th Enfold build out with more to come, I am always amazed the support you guys provide.
Thank you for your help!August 11, 2018 at 9:37 pm #996344HI again,
Another related question:
I tried to add another filter for art style and only the first shortcode you gave me worked.
[av_sidebar widget_area='Art Style Filter'] doesn’t work.
I also tried adding the filter to the same widget wit the color and it doesn’t show.Additionally, I want to add these two filters to a separate page that will pull one product category. For instance:
Shop page has both filters. (Default shop page)
Prints page will have the same filters. (Custom enfold layout page)Not sure what I’m missing here.
- This reply was modified 6 years, 4 months ago by mnoack1.
August 12, 2018 at 8:22 am #996415Hi,
Afaik custom enfold layout pages don’t support the widget. Only the woocommerce shop and the category pages support it. You could use the category description field (Products > Categories > select a category and click “Edit”) to add the shortcode/widget area to a category page. Then add this code to the functions.php:
add_action( 'init', 'avia_process_woocommerce_taxonomy_archive_description' ); function avia_process_woocommerce_taxonomy_archive_description() { remove_action( 'woocommerce_before_shop_loop', 'woocommerce_taxonomy_archive_description', 11 ); add_action( 'woocommerce_before_shop_loop', 'avia_woocommerce_taxonomy_archive_description', 11 ); } function avia_woocommerce_taxonomy_archive_description() { if ( is_product_taxonomy() && 0 === absint( get_query_var( 'paged' ) ) ) { $term = get_queried_object(); if ( $term && ! empty( $term->description ) ) { echo ' <div class="term-description">' . do_shortcode($term->description) . '</div> '; } } }
otherwise the category page will ot execute the shortcode.
Best regards,
DudeAugust 14, 2018 at 12:22 am #996915Hi Dude,
That worked really great. I didn’t know that all the shortcodes can be added to the category descriptions. Fantastic!.
Thank you!August 14, 2018 at 7:08 am #996972Hi,
Great, glad we could help :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardAugust 14, 2018 at 2:28 pm #997094Hi Rikard,
Yes, please go ahead and close this topic.Thanks!
August 14, 2018 at 10:26 pm #997341Hi,
Glad we could help!
Please take a moment to review our theme and show your support https://themeforest.net/downloads
Don’t forget to bookmark Enfold Documentation for future reference.Thank you for using Enfold :)
Best regards,
Basilis -
AuthorPosts
- The topic ‘Woocommerce attribute filter shortcode issue’ is closed to new replies.