[Resolved] Create element for categorie product

Home Forums Support Create element for categorie product

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #908558

    I’m coming back to you because I want to create something like the “Single Post Entry Header” theme “Merch” but for product categories in woo commerce. Can you tell me how to create one? The php calls the pages “taxonomy-product_cat.php” to display the product categories. thank you

    Customer Support

    Hi there,

    so you could try this – which is sort of the other way around to how the posts work.

    1. Create a new Header Element
    2. Content:


    3. Set your top bottom padding around 100px, set center alignment and then set the Display Rules to Product Category Archive

    1. Create a new Hook Element
    2. Content:

    global $wp_query;
    $cat = $wp_query->get_queried_object();
    $thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
    $image = wp_get_attachment_url( $thumbnail_id );
    if ( $image ) {
    	echo '<div class="grid-container prod-cat-header-img"><img src="' . $image . '" alt="' . $cat->name . '" /></div>';

    3. Select the after_header hook.
    4. Check execute PHP
    5. Set the priority to 15
    6. Set the same display rules as above.

    Then add this CSS:

    .prod-cat-header-img.grid-container {
        padding-left: 0;
        padding-right: 0;

    Thank you very much for your help, it works perfectly.

    That’s great.;)

    Customer Support

    Thats awesome – i originally abandoned the idea when building Merch – so glad you asked and we have a good solution

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.