• Resolved Ommy

    (@bounomid)


    Hello, Thank you so much for the plugin

    In my website below headings of shopping pages I use a snippet to display a shortcode. link

    add_action( 'ocean_after_page_header', 'category_before_en1', 5 );
    function category_before_en1() {
        $term_slug = 'buy-online';
        $taxonomy  = 'product_cat';
    
    $term_id   = get_term_by( 'slug', $term_slug, $taxonomy )->term_id; // Get the term ID
    $child_ids = get_term_children( $term_id, $taxonomy ); // Get the children terms IDs
        $terms_ids = array_merge( $child_ids, [$term_id] ); // an array of all term IDs (main term Id and it's children)
    
    if ( is_product_category( $terms_ids ) ) {
                     echo do_shortcode( '[elementor-template id="53033"]' );
    
    
        }}

    How can I add short code below brand pages heading? Link

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘shortcode below heading’ is closed to new replies.