Tagged: category page
-
AuthorPosts
-
July 18, 2017 at 4:09 pm #823377
Hi I would like to move all product category descriptions from the top of the page to the bottom. It is a good area for SEO content but prevents immediate viewing of products when seen on a mobile which I’m worried might cause an increased bounce rate.
July 20, 2017 at 4:35 pm #824676Hey lswnligh,
Here is the code you can put in your funtions.php
function av_move_wc_cat_description(){ ?> <script> jQuery(window).load(function(){ jQuery(".term-description").insertAfter(jQuery(".products")); }); </script> <?php } add_action('wp_footer', 'av_move_wc_cat_description');
If you need further assistance please let us know.
Best regards,
VictoriaJuly 20, 2017 at 6:19 pm #824763Hi Victoria,
Where do I find the functions.php and will this code have to be added everytime there is an update?
Many thanks
July 20, 2017 at 6:25 pm #824773Hi,
You can find functions.php through Appearance > Editor in your Dashboard, or in your theme’s folder.
Updates only override files of the parent theme. To avoid your changes to be overwritten, you should use a child theme and place your changes in functions.php of the child theme. This file will be loaded before functions.php of the parent theme. You can also check this detailed answer for more info: https://kriesi.at/support/topic/changes-to-functions-enfold-php/#post-305311
I hope that helps!
Best regards,
SarahAugust 5, 2017 at 12:12 am #834529Hello
I am sorry but i want to do the same thing and it doesn’t work for me
Here is my code
<?php /* Chargement de la feuille du style du theme parent */ add_action( 'wp_enqueue_scripts', 'wpchild_enqueue_styles' ); function wpchild_enqueue_styles(){ wp_enqueue_style( 'wpm-enfold-style', get_template_directory_uri() . '/style.css' ); add_filter('avf_blog_style','avia_change_category_blog_layout', 10, 2); } function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'blog-grid'; return $layout; } function av_move_wc_cat_description(){ ?> <script> jQuery(window).load(function(){ jQuery(".term-description").insertAfter(jQuery(".products")); }); </script> <?php } add_action('wp_footer', 'av_move_wc_cat_description');
what is the problem please?
Thanks a lot
Regards
JessyAugust 5, 2017 at 12:31 am #834535Hi,
And I have an another question please : I have changed my category description in order to put the blog grid (thanks to you) :
function avia_change_category_blog_layout($layout, $context){ if($context == 'archive') $layout = 'blog-grid'; return $layout; }
I think that my website is very slow and i think that it’s because i have charged the entire dummy.xml
So i want to do the housework
So i would like to remove pages like “Blog-grid”
But if I do that, can you tell me if my function will still work?Thanks a lot,
Regards,
JessyAugust 10, 2017 at 9:12 pm #837147Hi,
Yes – the pages have nothing to do with the functionality!
The pages are just there to show the result, but have nothing to do with the actuall functionality of Enfold!You can delete it with no problems.
Best regards,
BasilisOctober 31, 2019 at 9:33 am #1152633The first code for moving Category Description still works OK if anyone is still looking for it
November 1, 2019 at 6:52 am #1152938 -
AuthorPosts
- You must be logged in to reply to this topic.