-
AuthorPosts
-
May 15, 2017 at 3:02 pm #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 99999add_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; }May 15, 2017 at 3:23 pm #793364Okay, as I understand, I can’t change it because it overrided by avia_woocommerce_before_main_content function.
May 16, 2017 at 11:48 am #793831Hi mdxclr,
Do you still need help or you figured it out?
If you need further assistance please let us know.
Best regards,
VictoriaMay 17, 2017 at 1:49 am #794561Yeap, still want to change it without overriding function =)
May 17, 2017 at 6:44 am #794667Hi,
This link should help you with the overwritten problem: https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/
Best regards,
John TorvikMay 18, 2017 at 11:52 am #795817In my first post I’ve present my filter hook, but it doesnt work, with any priority.
May 18, 2017 at 7:46 pm #796116Hi mdxclr,
So you could hook it to the avia_woocommerce_before_main_content action and see if that works.
Best regards,
VictoriaMay 18, 2017 at 10:39 pm #796212Okay, so the only one way to replace it – rewrite avia_woocommerce_before_main_content hook?
May 19, 2017 at 1:05 pm #796550Hi 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,
VictoriaMay 20, 2017 at 2:18 pm #797000After that moves my theme will not ‘Upgrade Safe’. Want to change it using Child theme only
May 22, 2017 at 10:29 pm #797949Hi,
I am sorry but could you please explain what you mean?
Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.
