- This topic has 12 replies, 4 voices, and was last updated 5 months ago by
Anonymous.
-
AuthorPosts
-
January 4, 2023 at 10:06 am #2483721
Anonymous
Hello,
I want to change design mo mobile menu and would like to do something simular to the mobile menu on the URL below, meaning adding a separation space between header and first menu item, to place an arrow to the right, a white separation line between them and adding Follow us with social media icons, how I can achive this?
Thanks!
Sara
January 4, 2023 at 11:20 am #2483814Ying
StaffCustomer SupportHi Sara,
It will require custom CSS.
Can you show us your site? Are you using off-canvas menu for mobile now?
January 5, 2023 at 3:44 am #2484434Anonymous
Hi Ying,
No, right now Off Canvas Panel is Off so, I am not using it.
Ok how I can do this? I placed URL website below
Thank you!
January 5, 2023 at 5:17 am #2484528David
StaffCustomer SupportHi there,
for the Social Icons or other content below the menu:
1. Create a new Block Element.
2. Set the Hook to:after_primary_menu
3. Set the Priority to50
4. Add your content inside with a Container Block and give it an Advanced > CSS Class ofhide-on-desktop
For the other styles – do you plan on adding sub menus ? As the example site has those which is why the arrows are there. Let me know.
In the meantime, this CSS will provide the underlines:
@media(max-width: 768px) { .main-navigation.toggled .main-nav>ul>li { padding: 0 20px; } .main-navigation.toggled .main-nav>ul>li>a { border-bottom: 1px solid rgba(255,255,255,0.5); padding-left: 0; } }
January 5, 2023 at 8:28 am #2484873Anonymous
Hello David,
Just a few questions:
1) On Block Element Hook what PHP code should I add to it? And on Display Rules I put “Entire Site” correct?
2) How do I add social icons?
3) I did not understand point 4, which content should I add to a Container Block and where should I create this Container Block?
About your questions: No I dont think I will use sub menu at least in mobile, in desktop might use it if all menu options dont fit on menu.
January 5, 2023 at 11:36 am #2485044Ying
StaffCustomer Support1) On Block Element Hook what PHP code should I add to it? And on Display Rules I put “Entire Site” correct?
No PHP code will be needed. You just need to add social icons to the block element.
The display rule is the entire site.2) How do I add social icons?
If you have GenerateBlocks plugin installed, you can use the buttons block, it has built-in social icons. If you require specific social icons, you can get the icon’s SVG code and enter it in the Buttons block’s icon field.
3) I did not understand point 4, which content should I add to a Container Block and where should I create this Container Block?
Container block is a block of GenerateBlocks plugin. In the block element, add a Container block with the additional CSS class:
hide-on-desktop
, detailed how to:
Adding CSS class(es): https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/Then add the Buttons block (social icons) to the Container block.
January 6, 2023 at 5:15 am #2485742Anonymous
Hi Ying,
I think I understood most of it and what is a Container Block the thing I still dont understand is where I create this Container Block? Do I create this on Hook Element, on a Page or where should I created so, I placed icons inside of it and css class to it?
Thanks,
Sara
January 6, 2023 at 5:54 am #2485782David
StaffCustomer SupportIn Appearance > Elements, add new Block Element.
You will be presented with the editor that looks like the normal post block editor.
Simply add New Block to the page, and select a Container Block.
Then inside that Container add new block and select a Buttons block.March 13, 2023 at 7:51 am #2566023Anonymous
Hello David and Ying,
Sorry for the late reply,
Just a few questions:
1) I got it now thanks but, where I am supposed to publish it so, it shows only on mobile menu at the bottom after all menu elements like on site mentioned below?
2) Since I am placing in the social icons on the middle maybe is just better to do the same for the mobile menu, how I can make the following changes on menu:
a) Remove 10px padding from top and bottom since I will ad 2 more menu items and social icons
b) Center menu items
c) Add white separation border on topThanks for your time,
Sara
March 13, 2023 at 8:36 pm #2566703Fernando Customer Support
Hi Sara,
Let’s discuss #1 first.
Add your content inside with a Container Block and give it an Advanced > CSS Class of
hide-on-desktop
Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/
April 21, 2023 at 4:17 am #2616715Anonymous
Hi Fernando,
Sorry for the late reply, I been thinking and I am actually leave mobile menu as it is I just would like to only the following changes to it:
1) I would like to center menu items
2) I would like to put an extra separation line on top of first menu item (same as others)
3) I would like to remove some padding space between separation lines and menu items like 10px maybe.
Please let me know how to do this so, I can mark as resolved topic.
Thanks,
Sara
April 21, 2023 at 10:20 am #2617113Ying
StaffCustomer SupportFor #1 and #2, try adding this CSS:
@media(max-width: 768px) { .main-navigation.toggled .main-nav>ul>li>a { text-align: center; } .main-navigation.toggled .main-nav>ul>li:first-child>a { border-top: 1px solid rgba(255,255,255,0.5); } }
For #3, you should be able to reduce it at customizer > layout > primary navigation >menu item height, make sure you click the mobile icon so the change only applies to mobile.
April 24, 2023 at 6:04 am #2619287Anonymous
Hello Ying,
Thank you very much that solution worked perfectly 🙂
Have a great day!
-
AuthorPosts
- The topic ‘How change design on mobile menu?’ is closed to new replies.