• Resolved oliverm

    (@oliverm)


    Hi all

    Is there an action hook that will allow me to insert a wrapper div *after* the heading on an archive page?

    I have this code which does what I want but it inserts the wrapper before the heading. This results in the heading being included in the div. The results of which can be seen here
    https://www.marshallgames.co.uk/product-category/manufacturers/victory-point-games/

    ***************************
    function start_wrapper_here() { // Start wrapper
    if (is_product_category()) { // Wrapper for a product category page
    echo ‘<div class=”product-category-wrapper”>’;
    }
    }
    add_action( ‘woocommerce_before_main_content’, ‘start_wrapper_here’, 20 );
    ****************************

    However, I want it to look more like this page where the white background div begins after the H1 tag on that page.
    https://www.marshallgames.co.uk/brand/x-wing/

    Any suggestions as to how I can do this with an action?

    Olly

Viewing 1 replies (of 1 total)
  • Thread Starter oliverm

    (@oliverm)

    Dont’ worry. I changed the branding page to match the category page instead of the other way around. It was just easier.

Viewing 1 replies (of 1 total)
  • The topic ‘action to insert wrapper div *after* heading on archive page’ is closed to new replies.