Home › Forums › Support › Setting up an individual sticky menu on main pages and their relevant posts
- This topic has 49 replies, 3 voices, and was last updated 1 year, 9 months ago by Fernando.
-
AuthorPosts
-
June 1, 2022 at 11:12 pm #2240954robchanoi
Tring to set up an individual sticky menu on main pages and their relevant posts.
Came across this – generatepress-guides.com/2020/10/07/how-to-create-sticky-blocks-in-the-generatepress-sidebar/
but I’m not quite following the instructions.
Wld like it to look smt like lelo’s categories menu on right side, but in this case left side and open not closed although on money pages closed probably better if such an option is possible – if too extreme no problem :/
lelo.com/sona-2-cruiseMight be a holiday your end so whenevers great – cheers
June 1, 2022 at 11:31 pm #2240963Fernando Customer SupportHi Robchanoi,
The categories menu in the reference link you provided would need a custom JS to achieve. Specifically, from the menu appearing once the categories “button” is selected.
This customization would be out of our scope of support.
The concept would be similar to something like this: https://www.w3schools.com/css/tryit.asp?filename=trycss_display_js
If it’s a just the menu without the button, we can do it through Creating a Block Element with a Container Block with Headline Blocks within it designed appropriately, then we can provide CSS to make it fixed to the right.
Alternatively, if you’re not using the off-canvas menu for anything else, we can use that instead I believe.
Hope this clarifies!
June 1, 2022 at 11:43 pm #2240972robchanoiThanks Fernando.
These floating bespoke menus would have quite a few links relating to their field which I wouldnt want appearing in the current top nav menu if thats what wld happen – not fully sure how this wld work if u cld clarify pls.
Alternatively, Creating a Block Element with a Container Block with Headline Blocks sounds good. So this wld be a block element that could be assigned where i choose or wld have to be built into posts?
Tks
June 1, 2022 at 11:54 pm #2240980Fernando Customer SupportBasically, with just a Block Element and custom CSS, we can make a menu appear at the side, however, it would always be appearing.
You would need custom JS to achieve the hide and show effect of the menu.
If you’re not using the Off Canvas Menu, we can also use that, however, if you’re planning to add this in the website we we were tackling in the other topic, you’ve already used the off canvas menu there.
You can also explore third party plugins which may offer such a functionality: https://bashooka.com/cms/off-canvas-navigation-menu-wordpress-plugins/
Hope this clarifies!
June 2, 2022 at 12:01 am #2240988robchanoiOk, thank you, if we cld run with the Block Element and custom CSS that wld be good.
Do I set element type to “left sidebar”?Thanks
June 2, 2022 at 12:04 am #2240993Fernando Customer SupportYou can set it to Hook, then hook it to
before_header
then we’ll use CSS to move it.June 2, 2022 at 12:10 am #2240995robchanoiThanks – if its a series of topic related links one headline block is fine?
i.e
how to this
how to that
..
..
..June 2, 2022 at 12:17 am #2240999Fernando Customer SupportIt might be better to use different Headline Blocks for ease of modification.
You may also use a WP Post Navigation Block though we’ll need custom CSS to alter the look of this.
Hope this clarifies!
June 2, 2022 at 12:30 am #2241007robchanoiOk thanks – I have built a demo menu – do you need anything more from me?
June 2, 2022 at 12:48 am #2241024robchanoi350 w x 700 h fyi
All posts are centred at 650 wJune 2, 2022 at 12:57 am #2241039Fernando Customer SupportCan you share the link to where I can see the menu?
You may use the private information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Hope to hear from you soon!
June 2, 2022 at 1:02 am #2241054robchanoiLink below
June 2, 2022 at 1:09 am #2241060robchanoiThank you
June 2, 2022 at 1:11 am #2241062Fernando Customer SupportGreat!
Can you add
my-side-menu
class to the classes of the Container Block?Example: https://share.getcloudapp.com/bLuBJz64
Then set the Display Rule Location.
Then, add this CSS in Appearance > Customize > Additional CSS:
.gb-container.my-side-menu { position: fixed; top: 50%; transform: translateY(-50%); right: 0; }
Kindly let us know how it goes.
June 2, 2022 at 1:31 am #2241081robchanoiThanks – have added css to add css and my-side-menu to the class of the Container Block.
I should put headline in a container inside menu container? Have placed my-side-menu in menu container.
I also cant locate – layout – default in the bottom left of your pic.
Tks if u could advise.
-
AuthorPosts
- You must be logged in to reply to this topic.