Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #793352

    Hello,
    I’ve tried to use hook avia_layout_filter for changing sidebar position on Single Product page.
    Tried also change prior from 1 to 99999

    add_filter('avia_layout_filter', 'avia_change_post_layout', 9999999, 2);
    function avia_change_post_layout($avia_config, $post_id){
    	$result = 'sidebar_left';
    	$avia_config['layout']['current'] = $avia_config['layout'][$result];
    	$avia_config['layout']['current']['main'] = $result;
    	return $avia_config;
    }
    #793364

    Okay, as I understand, I can’t change it because it overrided by avia_woocommerce_before_main_content function.

    #793831

    Hi mdxclr,

    Do you still need help or you figured it out?

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #794561

    Yeap, still want to change it without overriding function =)

    #794667

    Hi,

    This link should help you with the overwritten problem: https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/

    Best regards,
    John Torvik

    #795817

    In my first post I’ve present my filter hook, but it doesnt work, with any priority.

    #796116

    Hi mdxclr,

    So you could hook it to the avia_woocommerce_before_main_content action and see if that works.

    Best regards,
    Victoria

    #796212

    Okay, so the only one way to replace it – rewrite avia_woocommerce_before_main_content hook?

    #796550

    Hi mdxclr,

    Not rewrite, check what code is there and maybe add your own. Or remove this action, and add your own which will be avia_woocommerce_before_main_content + your code. Does it make sense?

    Best regards,
    Victoria

    #797000

    After that moves my theme will not ‘Upgrade Safe’. Want to change it using Child theme only

    #797949

    Hi,

    I am sorry but could you please explain what you mean?

    Best regards,
    Basilis

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