- This topic has 14 replies, 5 voices, and was last updated 1 month, 4 weeks ago by Fernando.
June 8, 2022 at 8:31 am #2247459ammgbr
I want to add various dropdown menus within the content area. I tried using third party accordion on a grid layout (3 in a row) but does not suit me as everytime one accordion opens the content below them is pushed down.
I need to achieve the same effect the primary menu has when on opening the submenu hides any other content over that page space but does not pish the page xontent further down.
Is it possible to create multiple different dropdown menus & add them via a hook or shortcode anywhere on generatepress?June 8, 2022 at 10:20 am #2247562YingStaffCustomer Support
This is not something that the theme can do.
I would recommend trying WP’s Navigation block.June 10, 2022 at 3:54 am #2249116ammgbr
thank you for your reply.
I have tried the nabigation block, it does not display the menu properly.
Is there not a way to create multiple menus and display them anywhere on the theme?June 10, 2022 at 5:48 am #2249184DavidStaffCustomer Support
Is there not a way to create multiple menus and display them anywhere on the theme?
No, the Theme provides 3 x Navigation elements, each of which can display a single Menu and can be displayed within the theme. They are not built for displaying inside your content.June 10, 2022 at 11:15 am #2249594ammgbr
I have tried this solution from another topic with some success:
That would allow me to display a menu with a shortcode anywhere on the site where it can run shortcodes.
The issue is that the menu just appears as a list – is it possible to make it expand on click?June 11, 2022 at 3:51 am #2250013DavidStaffCustomer SupportJune 11, 2022 at 4:20 am #2250029ammgbr
I don’t understand why a PHP snippet solution with CSS styling is provided to another GP user (see link below) but for my case it is a matter for custom development. It is the same question.
My question is in line with the GeneratePress Premium support scope (link below):
The ‘What support includes’ link refers support for PHP/HTML issues on top of CSS support for those who have purchased the premium license.
The php snippet I used should work on hover with the right modifications and/or CSS – but I have not the technical ability to identify this.
When it comes to providing custom coding solutions, it really depends on the complexity behind it and whether or not our team has something they can easily share. It’s possible that the solution you linked to was something Elvin had pre-built or had close by. We simply can’t be spending 30+ minutes building custom solutions in the forum here – doing so would require us to dramatically increase the cost of the product.
As for this issue, I don’t see that code on your page. What exactly about it isn’t working, and is there somewhere I can see it not working?
Thanks!June 11, 2022 at 11:32 pm #2250635ammgbr
I do not have technical expertise hence I purchased your product to facilitate aspects of website building.
I do not know when a CSS or PHP or HTML solution provided by support is custom code or just easily sourced and shared. I do not know where that threshold is. I have another day job and during my free time I try to make the best of the resources I have available to build my site always in line with their T&Cs.
I appreciate the product and this is shown by my purchase of a premium license and its renewal.
I thought I was abiding by the GP rulebook which states that premium license is provided with support including CSS, PHP , HTML. I had not appreciated that php for my question was a more difficult thing to achieve.
When support is unable to assist I am happy to have a brief explanation as to why the issue is more complex and even what custom code development is and where to source it – that would be educational for me or anyone else reading later on (I gather these forum pages are indexed).
I have removed this php code as I could not fix it despite trying some solutions found elsewhere.
As I understand now php codes for dropdown menus are difficult/time consuming so your team cannot provide solutions or direction.
I have hence searched and found this resource which I will try: https://blog.hubspot.com/website/html-dropdown
Thanks!June 12, 2022 at 6:19 am #2250884ammgbr
I have tried using the php code again.
The menu is displayed but the submenu is already open.
Is there a CSS or php modification to achieve having the submenu closed and open on click?June 12, 2022 at 5:46 pm #2251416Fernando Customer Support
What PHP did you use? Is it the one you linked? It seems the menu you added isn’t working as expected. There should be a script toggling the menu open and close. Your menu isn’t doing that. Were you able to add the script mentioned at the bottom of the article?: https://blog.hubspot.com/website/html-dropdown#:~:text=and%20the%20result%3A-,Multiselect%20Dropdown,-In%20the%20examples
Moreover, may I know why a navigation Block wouldn’t work for you? Perhaps we can alter that with CSS if it’s the design that isn’t working out for you.
Kindly let us know.
Lastly, with regards to customization in terms of PHP, CSS and HTML, our support includes providing basic examples and getting our customers headed in the right direction: https://generatepress.com/what-support-includes/
We try our best though to go out of our way and provide extensive support when we can, depending on the issue at hand, the difficulty and the time it would take to finish.
Hope you understand!June 13, 2022 at 12:05 am #2251587ammgbr
Hello thank you for your reply:
I used the following:
$atts = shortcode_atts( array(
‘menu_name’ => ”
), $atts, ‘portable_menu’ );
‘menu’ => $atts[‘menu_name’],
‘container’ => ‘div’,
‘container_class’ => ‘portable-nav’,
‘menu_class’ => ”,
‘fallback_cb’ => ‘generate_menu_fallback’,
‘items_wrap’ => ‘<ul class=”portable-nav-menu ‘ . join( ‘ ‘, generate_get_element_classes( ‘menu’ ) ) . ‘”>%3$s‘,
The menu is produced but the submenu is opened.
If this is difficult to achieve with CSS I can just let it go , I understand it is a more complex questionJune 13, 2022 at 3:35 am #2251777Fernando Customer Support
The WP Navigation Block already has this “embedded” to it, so no need for custom code: https://share.getcloudapp.com/E0uybwq6
You’ll only need CSS which we can try to help you with.
Hope this clarifies!June 13, 2022 at 4:17 am #2251816ammgbr
Thank you for clarifying this.
I had tried the navigation block before, it works but the issue is that if you amend the menu it does bot update. And tbh I have tried removing a menu drom the block in order to re-introduce the amended menu & embarassingly could not manage to get round how to do this.
But will try again later today & see if I can get my head round how to change amended menus on the navigation blockJune 13, 2022 at 5:04 pm #2252573Fernando Customer Support
Here’s the documentation for the WP Navigation Block: https://wordpress.org/support/article/navigation-block/
If you get around it and decide to use it, we’ll be here if you’ll need guidance styling it.
Feel free to reach out anytime!
- You must be logged in to reply to this topic.