Hi @registerone,
there is not an option to open the navigation on the main page.
The navigation does open automatically once you click on the single section you have at the moment.
Yet you can trigger a click on the navigation once the page is loaded using Javascript.
The code to do that would be like this:
add_action( 'wp_footer', function(){
?>
<script type="text/javascript" id="testing">
jQuery(document).ready( function($){
$( '.bpress-nav-section' ).first().click();
});
</script>
<?php
}, 9999 );
I hope this helps!
OK, yes, I could do a js click simulation. It would be handy to have that option built into the plugin at some point maybe. Thank you.
Hi,
as you have a single section it might make sense to have that open directly.
But when the entry page to the knowledge base has more sections and there are many articles it would not be optimal to have the whole menu opened automatically.
For example like in our KB.
I am open to new ideas though!
Hi,
I just wanted to suggest another possible way to have the navigation open without using JS.
You can use this code by adding it to your functions.php:
https://gist.github.com/BrElio/3951370a548fd631c785a74ee1cb311a
It might be a better alternative!
I agree, if they were all opened, it might not be the best, but maybe the first one as an option. I will try the filter you shared. Thank you!
Hi @registerone,
I haven’t heard from you so I am closing this issue.
If you still need help don’t hesitate to open a support ticket from the plugin’s menu.
Thanks