Archived topic
generate_after_slideout_navigation problem! (Help)
19 replies · Started by johnaps on October 9, 2022
David the video i sent above
https://drive.google.com/file/d/1VOqiIqJiCcvR4BtEcC5N1h4tNmPGEg3P/view
is with the position sticky css rule...
As you can see when the elements inside nav#generate-slideout-menu div.inside-navigation.grid-container.grid-parent are shorter than 100vh then the #custom_html-65 element is higher than bottom: 0px
Another thing i can try but idk if it is bad code-wise is this
add_action('generate_after_slideout_navigation', 'end_custom_inside_navigation_html_element');
add_action('generate_after_slideout_navigation', 'after_end_custom_inside_navigation_html_element', 11);
function end_custom_inside_navigation_html_element() {
echo '</div>';
}
function after_end_custom_inside_navigation_html_element () {
if (is_product_category() || is_product_tag() || is_product_brand() || is_search()) {
$closebutton = do_shortcode('[facetwp facet="result_count"]');
echo '<aside id="custom_html-65" class="widget_text slideout-widget widget_custom_html"><div class="textwidget custom-html-widget"><div class="slider-exit"><a href="#">' . $closebutton . '</a></div></div></aside>';
}
}
This indeed puts a custom end
for div.inside-navigation.grid-container.grid-parent element and thus making my custom_html-65 be actually after div.inside-navigation.grid-container.grid-parent
but i dont know if this is ok cause it supposedly there should be an extra
hanging around which isnt visible...
You can look here at this solution (bellow 1014px media screen width)
https://testsofi4nos0rth0new.kinsta.cloud/%CE%BF%CE%BE%CF%85%CE%B3%CE%BF%CE%BD%CE%BF%CE%B8%CE%B5%CF%81%CE%B1%CF%80%CE%B5%CE%AF%CE%B1/