Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,

    WordPress themes are made up of different templates, so you will need to edit a template file.

    You can use this plugin to find out the correct template file.

    Gr

    Thread Starter Elzette Roelofse

    (@semblance_er)

    Thank you for your quick response.
    The plugin you suggested is really helpful.

    I am using Genesis Framework, with a custom child theme.
    Whilst I have copied over some of the WooCommerce template files into the child theme, ‘What The File’ is showing the default Shop page is using page.php.

    Not sure in which template part to go look so that I can swop those in the list?
    Any ideas?

    Thank you!

    Hi,

    Can you copy/paste the sourcecode from the page.php file? or make a screenshot from the sourcecode?

    Gr

    Thread Starter Elzette Roelofse

    (@semblance_er)

    Thank you again for your help.

    It’s referring to Genesis default page.php – nothing much to see.
    Yet it is using WooCommerce template elements.
    Here is the screenshot: https://www.dropbox.com/s/xwt5dx7rnscucbt/Screenshot%202019-10-15%2013.10.19.png?dl=0

    I tried to move those elements using JS – but somewhere / somehow WooCommerce keep the styles, to not let the products move up in the list. See the categories at the bottom.
    https://staging2.cswireless.co.uk/shop/

    I’m lost.

    Hello @semblance_er,

    You could do this by inserting content into the woocommerce_after_shop_loop hook. WooCommerce has a shortcode that will display product categories that we can make use of here.

    You’d set the shop page to only show products and not categories. Then you can use this snippet to insert the categories via shortcode on the shop page.

    
    add_action( 'woocommerce_after_shop_loop', 'ijab_insert_after_shop_products', 10 );
    
    function ijab_insert_after_shop_products() {
    	if ( is_shop() ) {
    		echo do_shortcode( '[product_categories]' );
    	}
    }
    

    It’s not extensively tested, but it did work on my development site just now. There are other hooks you can use. Business Bloomer has a visual guide to them here:

    https://businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/

    If you have any questions or trouble, let me know.

    Cheers

    Thread Starter Elzette Roelofse

    (@semblance_er)

    Hello @3sonsdevelopment

    Thank you so much for your reply and the info!
    That was exactly the direction I was aiming for.
    Got stuck at how to get the categories loop in… never thought of just using the shortcode (⊙.☉)7

    Your suggestion works perfectly!
    (the Business Bloomer visual hook guide is awesome!)

    All the best.
    Elzette

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show products then categories in Shop page display’ is closed to new replies.