Support » Plugin: WooCommerce » Adding content below product list?

  • Resolved luzzati

    (@luzzati)


    Hi
    Anyone knows how to add content (text & images) below product list in Category pages?

    The default option is adding content above the product list, but I want my visitors first see the products and then my added content…

    Many thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Remi Corson

    (@corsonr)

    Automattic Happiness Engineer

    Hi @luzzati!

    In this case the best method would be to work with WooCommerce custom templates. Basically a custom template allows you to override WooCommerce default files and use your own custom files instead. Here is a quick tutorial (https://docs.woocommerce.com/document/template-structure/) that will explain you how to create your custom templates. Also, if some of your existing custom templates are outdated, I would suggest updating them (https://docs.woocommerce.com/document/fix-outdated-templates-woocommerce/).

    WooCommerce comes with a number of front-end HTML templates as well as email templates. Instead of editing these files directly within the plugin (which is a very bad idea because once update the plugin and all of your changes will be lost!), you can copy them into your theme:

    1. In your theme directory, make a new folder called woocommerce.
    2. Navigate to the WooCommerce plugin directory and open the templates folder. The templates folder has a lot of subfolders with all of the different templates that WooCommerce uses.  Fortunately, the template file structure and naming in WooCommerce is easy to follow.
    3. In your newly created woocommerce folder, copy the template file that you want to edit. Remember to keep the directory structure the same here. If the template you want to edit is within a subfolder then remember to create that subfolder within your theme’s directory.
    4. Edit the file from within your woocommerce folder and save the changes.

    Also, please note that if you choose to use custom templates now, WooCommerce 3.3 will bring some changes in the names and the structure of a couple templates.

    I will try – thank you!

    Creating a custom template is a good solution, but if your needs are simple you may be able to do this using a hook:

    add_action( 'woocommerce_after_main_content', 'add_my_text', 20 );
    function add_my_text() {
      print '<p>This is my extra text.</p>';
    }

    The snippet goes in functions.php for your child theme or, if you don’t have a child theme you can use the “My Custom Functions” plugin.

    Remi – I just did not find what is the woocommerce template I should change

    • This reply was modified 2 years, 11 months ago by luzzati.

    Lorro – Thank you. It works fine.

    I need Description box content of each Category page to be placed below product list.

    My aim is to improve the SEO of each category page by adding relevant content, but I want to keep the products on top of page – first thing visitors see.

    Right now I am able to add content in the Description box (see here), but it is displayed on top of page. So I need to move that description on bottom page, just below product list.

    The solutions that you both @corsonr and @lorro kindly suggested are good for placing the same content in all category pages, sitewide, however I need to add different relevant content for each category page.

    Any ideas?

    Plugin Support Joel Williams

    (@joelwills)

    Automattic Happiness Engineer

    Hi there!

    You could use the category description to add unique category specific content to each page. There is an example of how to do this here:

    https://davidnash.com.au/woocommerce-category-description/

    Else you could use a conditional statement in the previous code saying if it’s this category page show this text, if this category page show this other text and so on.

    https://codex.wordpress.org/Conditional_Tags

    Hope that helps!

    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding content below product list?’ is closed to new replies.