Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1402816

    Hello to the team,
    I want to add a menu in the product sheet but I don’t want to use advanced page builder (need to work on all products) because it’s the final customer who will work on products. It’s better to have a template.
    I managed to put the menu on the shop page (without constructor) using the menu code :
    [av_submenu ...] … [/av_submenu] (it’s an example)
    https://lebazargraphik.com/produit02.jpg
    __________
    I have this : https://lebazargraphik.com/produit01.jpg
    I would have this : https://lebazargraphik.com/produit03.jpg

    Do you have any suggestion how can we achieve this?
    Kind regards,

    #1402853

    Hey mescalytequila,

    Thank you for the inquiry.

    You can use the “ava_after_main_title” hook to insert the submenu element after the main title container. Just add it in the functions.php file.

    Example:

    add_action("ava_after_main_title", function() {
       echo do_shortcode("[av_submenu ...] … [/av_submenu]");
    }, 10, 1);
    

    Best regards,
    Ismael

    #1402893

    Hi Ismael,
    Thanks for your response. But it doesn’t work.An other idea ?

    #1403079

    Hi,

    Thank you for the update.

    We modified the code in the functions.php file a bit and added another filter to allow execution of theme shortcodes outside the builder. This is the modified code.

    add_action("woocommerce_before_main_content", function() {
       echo do_shortcode("[av_submenu which_menu='' menu='58' position='center' sticky='aviaTBsticky' color='main_color' mobile='disabled' mobile_switch='av-switch-768' alb_description='' id='' custom_class='' template_class='' av_uid='av-ldyiqu1t' sc_version='1.0'] [av_submenu_item title='Élément 1 de menu' button_style='' link='' linktarget='' av_uid='av-gb0n7' sc_version='1.0'] [av_submenu_item title='Élément 2 de menu' button_style='' link='' linktarget='' av_uid='av-bn1kr' sc_version='1.0'] [/av_submenu]");
    }, 20);
    
    function avf_custom_exec_sc_only_mod( $exec_sc_only, $obj_sc, $atts, $content, $shortcodename, $fake ) {
    	return true;
    }
    
    add_filter( 'avf_alb_exec_sc_only', 'avf_custom_exec_sc_only_mod', 10, 6 );
    

    The submenu is now displaying correctly in the single product page but it might require a few css adjustments.

    Best regards,
    Ismael

    #1403122

    Many many Thanks Ismael !!!
    It works perfectly
    Best regards

    #1403153

    Hi mescalytequila,

    I’m glad that Ismael could help you :)
    Thanks for using Enfold and have a great day!

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Menu in a single product layout (with woocommerce)’ is closed to new replies.