-
AuthorPosts
-
May 3, 2021 at 9:32 am #1297950
Hello
Wordpress 5.7.1
Enfold 4.8.2General Layout > Logo and Main Menu = Left Menu > Sticky Sidebar menu both option for sticky not working anymore
Sticky if Sidebar is smaller than the screen height, scroll otherwise not working anymore
Always Sticky not working anymore
The class appears in the header but is not working : class=”all_colors header_color light_bg_color av_header_left av_header_sidebar av_conditional_sticky”Best Regards
ManuMay 4, 2021 at 8:45 am #1298215Hey manurimini,
Thank you for the inquiry.
Where can we see the issue? Please note that sticky sidebar option will only work if the sidebar is not taller than the content, otherwise the sidebar will just scroll with the page.
Best regards,
IsmaelMay 4, 2021 at 12:19 pm #1298253Hello Ismael
I have to correct my previous thread. The option Always Sticky works.
But the option “Sticky if Sidebar is smaller than the screen height, scroll otherwise” doesn’t. I have tested it on different installations.
You can easily check it on your own installation, but I still leave you access to mine in the private area.Thank you for your help
Manu- This reply was modified 3 years, 6 months ago by manurimini.
May 5, 2021 at 12:35 pm #1298521Hi,
Thank you for the info.
We adjusted the enfold/js/avia-snippet-sidebarmenu.js file a bit to fix the issue. It is now working correctly. Please purge the cache or do a hard refresh before checking the page.
We will forward the issue to our channel.
Best regards,
IsmaelMay 5, 2021 at 1:12 pm #1298538Hi,
Thank you Ismael. It works perfectly. Perhaps you should provide a link to download the file for other users with the same issue.
Best Regards
ManuMay 7, 2021 at 9:28 am #1298883Hi,
No problem. We will add a link to the modified file here.
modified enfold/js/avia-snippet-sidebarmenu.js : https://pastebin.com/ewFtY1kE
The actual fix will be included in the next patch.
Best regards,
IsmaelSeptember 28, 2024 at 12:32 pm #1468002sadly you do not go to your topics once posted : https://kriesi.at/support/topic/right-sidebar-menu-sticky/
I find the method of simply using the Header on Left Sidebar variant and simply moving it to the right, while retaining the properties set there, is also easy to implement.
However, if it is now included in the next version – it is of course the better option.
September 28, 2024 at 1:46 pm #1468004PS: in the newest Enfold 6.04 there is inside avia-snippet-sidebarmenu.js no difference between left and right sidebar.
Always only as selector for both .html_header_sidebar. So those files could be untouched !only that one entry in enfold_functions.php had to be deleted (1556ff):
if( strpos($header['header_position'] , 'left') === false ){ $header['sidebarmenu_sticky'] = 'never_sticky'; }
and those entries inside avia_layout.php had to be adjusted ( f.e. for the required lines – see line 210 on my edited file )
avia_layout.php on pastebin: https://pastebin.com/RnmpK2MuSeptember 28, 2024 at 2:22 pm #1468005Test is working without changing avia-snippet-sidebarmenu.js
but: What I noticed on this occasion is that the advanced layerslider are not styled correctly for the header sidebar. What was set for Header Top Centered in the layerslider is suddenly far from being centered. This is of course related to the fixation of the header. Fixed elements are, so to speak, outside the DOM.
Edit:
I now know what the problem was: the layer slider has a switch in the advanced project settings. There is a setting called “Fit to Screen Width” where it says : “If enabled, the slider will always have the same width as the viewport, even if a theme uses a boxed layout, unless you choose the “Fit to parent height” full size mode.”September 28, 2024 at 11:38 pm #1468034by the way –
how to have a child-theme avia_layout.phpvia filter: avf_theme_options_pages
this child-theme solution works as expected with the edited files from the bottom:
require_once( get_stylesheet_directory() . '/functions-enfold.php' ); function my_avia_layout_mod($avia_pages){ $avia_pages['layout']['include'] = get_stylesheet_directory().'/includes/avia_layout.php'; return $avia_pages; } add_filter( 'avf_theme_options_pages', 'my_avia_layout_mod', 10, 1 );
functions-enfold.php: https://pastebin.com/dl/UTGvNGKB (see lines 1556 – 1561)
– put into root directory of your child-theme
avia_layout.php: https://pastebin.com/dl/RnmpK2Mu
– put into includes folder (subfolder of child-theme)September 30, 2024 at 5:36 am #1468082Hi,
@Guenni007: Thank you for the solution. We’ll forward the thread to our channel. Looks like the user found a fix here: https://kriesi.at/support/topic/right-sidebar-menu-sticky/#post-1467794Best regards,
IsmaelSeptember 30, 2024 at 8:40 am #1468086Yes – if my fellow participant is happy with it, I’m happy with it too – but manu wrote:
Of course it would be nicer to have a function to make it scrollable as in the Left Sidebar Menu without the sidebar but my knowledge of php and js is very poor
September 30, 2024 at 10:00 am #1468091Hello everybody
I was out of town, so I did not have the opportunity to try Guenni’s solutions. Between today and tomorrow I would like to compare my solution and Guenni’s and then draw conclusions. Give me please a couple of days before closing the thread.September 30, 2024 at 11:20 am #1468095Or – if you are happy with your current solution – just wait for the next release – I think they will also extend the sticky option for the right header.
-
AuthorPosts
- You must be logged in to reply to this topic.