Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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.

    #824676

    Hey 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,
    Victoria

    #824763

    Hi Victoria,

    Where do I find the functions.php and will this code have to be added everytime there is an update?

    Many thanks

    #824773

    Hi,

    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,
    Sarah

    #834529

    Hello

    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
    Jessy

    #834535

    Hi,

    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,
    Jessy

    #837147

    Hi,

    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,
    Basilis

    #1152633

    The first code for moving Category Description still works OK if anyone is still looking for it

    #1152938

    Hi wealthyone,

    Thanks for sharing, it’s much appreciated.

    Best regards,
    Rikard

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.