Support » Plugin: WooCommerce » move product category description below shoparticles

  • Im using a WP theme that lets me use the product category description to add text to all my product categories. But as it is right now it adds this text before my shop contents.

    What i want to do is move this description to after the shop products.

    I have no idea where i should start looking for an hint on this. And im not sure if its woocommerce that decides this or the theme itself.

    Any input would be much appriciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I did this before and it involved splitting and moving hooks and some CSS. I can’t get to the files just now to give you more information but I will have a look later to see, if you haven’t resolved it.

    There is a file called single_product and another one with a similar name. I had to break down the hooks in them and reposition them in the php file.

    After that I used some CSS to move them around to get them where I wanted.

    As I said, I will have a look when I get home and try to get you more detail if you haven’t resolved your issue by then.

    On a side note, you might want to work with a child theme when modifying these files. WooCommerce has excellent support for them

    Thank you Colin,

    No i havent resolved the issue yet, and it seems kind of hard to fix?

    Im not the most advanced with css/php/html but im working my way around so any hints and tips i can get would be awesome.

    Hooks are used all over the place in WooCommerce and they’re actually very good.

    If you have a look in content-single-product.php you will see further down the code a number of statements that look like this

    do_action( 'woocommerce_single_product_summary' );

    These reference information in woocommerce-hooks.php. Now, you can mess around with these ‘do-action’ statements and actually break them down into the functions that are part of the actions.

    Here is the summary action in woocommerce-hooks.php

    	 * Product Summary Box
    	 * @see woocommerce_template_single_title()
    	 * @see woocommerce_template_single_price()
    	 * @see woocommerce_template_single_excerpt()
    	 * @see woocommerce_template_single_meta()
    	 * @see woocommerce_template_single_sharing()
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
    	add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 );

    If I remember correctly you can extract woocommerce_template_single_meta to get the categories and place it as a function in the content-single-product.php. Add it as woocommerce_template_single_meta();

    You should then see the categories listed wherever you put them. After that you will have to float or move it around and adjust it as you see fit.

    Good luck

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘move product category description below shoparticles’ is closed to new replies.