[Support request] generate_after_slideout_navigation problem! (Help)

Home Forums Support [Support request] generate_after_slideout_navigation problem! (Help)

Home Forums Support generate_after_slideout_navigation problem! (Help)

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #2371298
    johnaps

    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

    #2371306
    johnaps

    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/

    #2371754
    Fernando
    Customer Support

    I see. Code-wise, there should be a hanging </div> though because you added a </div>.

    How about changing this code:

    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>';

    to add

    at the start to test?:

    echo '<div><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>';

    Does it still work?

    #2372134
    johnaps

    Even if i add it at the start, the same behavior happens cause it will still be inside div.inside-navigation.grid-container.grid-parent…

    Can you point me where can i find the template for #generate-slideout-menu so i can edit it, if thats the only way?
    Also can you verify if i only need to copy the file to my child theme to edit it?
    Lastly in case of an update of that template file does gp provide any kind of notice inside wp-admin so i know i need to update it in the future (as woocommerce does?)?

    #2372867
    Fernando
    Customer Support

    It shouldn’t be inside div.inside-navigation.grid-container.grid-parent...

    The

    before <aside> will just turn the structure to <div class="inside-navigation grid-container grid-parent">...</div><div><aside id="custom_html-65"...>...</aside></div> – it should still be outside. It just closes the hanging </div>

    You can’t edit #generate-slideout-menu. It’s part of the plugin, not the theme. I think your solution should be good though.

Viewing 5 posts - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.