• Resolved mdm

    (@meggsp)


    Hi there

    So I just spent most of today trying to figure this out, and I’m finally beaten. Please help.

    On a woocommerce category page, I’m looking to have the category image banner on there and the archive description. But I would also like to move both of these to ABOVE the product area & sidebar area.

    Currently they are both sitting above products and beside the sidebar. Nothing I do seems to move it, and the hooks aren’t making any sense.

    Can someone please help?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support EastOfWest a11n

    (@eastofwest)

    Hi there!

    You can override and/or modify WooCommerce’s built in templates for this. There is a caveat – your theme might already be overriding the template, in which case you might also need a child theme to override that in way that won’t get erased, should you update your current theme in future.

    This doc explains the WooCommerce template structure and where to copy the defaults in order to override them:
    https://docs.woocommerce.com/document/template-structure/

    Here is one of the pages that governs what category pages look like:
    https://github.com/woocommerce/woocommerce/blob/4.2.0/templates/archive-product.php

    If you move your category image and description code to below get_header( ‘shop’ ) and above do_action( ‘woocommerce_before_main_content’ );, or hook what you’ve got to the action above prior to woocommerce_output_content_wrapper, it should appear above both the main content and the sidebar. I tested this in Storefront to verify, but could be different in yours.

    Plugin Support fevered – a11n

    (@fevered)

    Hey there, since we haven’t heard back from you in awhile I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.

    Thread Starter mdm

    (@meggsp)

    No, please don’t. A week is not a while. And creating a new thread is just going to add to the mess.

    I’ll try this shortly – I’m using a plumbing theme. I just want to move the category image so it’s the main image with description under that if present.

    Thread Starter mdm

    (@meggsp)

    THankyou for the response @eastofwest btw ?? I suspect it’s a hook which I haven’t found yet.

    Thread Starter mdm

    (@meggsp)

    It appears to be around this woocommerce_before_main_content

    Thread Starter mdm

    (@meggsp)

    I figured it out. The hooks did not work, so I located the section within the actual header file and referered to the category page in the php conditions.

    Please feel free to delete this thread now resolved, rather than close, as it won’t be of any help to others. Thankyou for your time both ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Moving featured image and archive description in woocommerce’ is closed to new replies.