-
AuthorPosts
-
December 4, 2017 at 4:24 pm #884681
Is there a way to add a simple drop-down down menu to a page? I need something like what you use to list/display links to post categories, but want to be able to have the options in the drop-down link to pages instead of posts.
Thanks!
December 4, 2017 at 5:41 pm #884723Hey NicomIT,
Please refer to the following. It is general tutorial on creating menus + dropdown in WordPress:
http://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/
Best regards,
Jordan ShannonDecember 4, 2017 at 7:36 pm #884754Thanks for the link Jordan. I have actually tried that, but when I create a new menu/widget and add it to a page it displays as a list style menu, not a drop-down. Is there a way to get it to display as a drop-down?
I did manually create something (see the link in the private info). But I can’t select the links in the menu below the “Filter By:” text. It seems like something else on the page from the theme is overriding it. Any ideas why that is happening or how to fix it?
December 4, 2017 at 9:03 pm #884784I created a test page that is uses a blank template with no header/footer and put the code for the drop-down on it and it seems to work fine. See the link below. It’s not using the Avia Layout Builder.
December 4, 2017 at 10:41 pm #884827Hi,
How did you add the menu? Please provide admin info so we can look into this further?
Best regards,
Jordan ShannonDecember 5, 2017 at 2:34 pm #885070Hi Jordan,
All I did was add a code block on the first page with a couple divs and the text that appears on the mousover and items that appear below it. On the second page that uses a blank template I just copied and pasted the html into the WordPress editor under the “Text” tab without activating the Avia Layout Builder.Login info is below in the private info.
Thanks!
December 5, 2017 at 11:57 pm #885265Hi,
I think we are miss-communicating a bit. So by dropdown do you mean like an options like like a form?
Best regards,
Jordan ShannonDecember 13, 2017 at 4:01 pm #888399Hi Jordan,
Sorry for not getting back to you. I had posted a reply, but it looks like something happened to it and I don’t see it here now. Anyway, yes I think you are on the right track. Like options in a form or a pull-down like what you would see in the blog to select different categories. A good example would be if you went to appearance > widgets and added the “A list or dropdown of categories” widget to the sidebar in the website or created a new widget with that. But I want to link to pages in the dropdown, not categories. I hope that helps.December 13, 2017 at 11:54 pm #888634Hi,
This may be possible with custom coding, but the work involved goes beyond the scope of support provided here in the forums.
Best regards,
Jordan ShannonDecember 14, 2017 at 2:10 pm #888877That’s actually what I ended up doing in two links I sent on December 5th. But it looks like something in the theme is preventing you from mousing over or selecting the links in the drop-down. So I was hoping you might know what is causing that.
December 15, 2017 at 12:05 am #889138Hi,
Is it the filter by section? Please paste the code that was used to create the effect.
Best regards,
Jordan ShannonDecember 15, 2017 at 2:07 pm #889297Hi Jordan,
Yes, that’s what I’m referring to. Here’s the code:<div class="dropdown"> <span><strong>Filter By:</strong></span> <div class="dropdown-content"> <p><a href="/blog/arts-culture/">Arts & Culture</a></p> <p><a href="/blog/attractions/">Attractions</a></p> <p><a href="/blog/eat-drink/">Eat & Drink</a></p> <p><a href="/blog/entertainment-music/">Entertainment & Music</a></p> <p><a href="/blog/outdoor/">Outdoor</a></p> <p><a href="/blog/shopping/">Shopping</a></p> </div> </div>
And here is the CSS:
.dropdown { position: relative; display: inline-block; } .dropdown strong { color: #fff !important; text-transform: uppercase; background-color: #00548B; padding: 15px 30px; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; width: 200px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); padding: 12px 16px; margin-top: 15px; z-index: 1; } .dropdown:hover .dropdown-content { display: block; }
December 15, 2017 at 6:05 pm #889345Hi Jordan,
I was able to figure out the issue. The elements on the page below the drop down were going over top of it. So adding this fixed the issue:#av_section_3, #after_section_3, #after_section_2 { position: relative; z-index: 0 !important; }
December 15, 2017 at 6:11 pm #889347Hi,
Great! I’m glad you were able to get this corrected. Did you need additional help, or shall we close this thread?
Best regards,
Jordan ShannonDecember 15, 2017 at 8:46 pm #889417No, I think I’m good. Thanks.
December 15, 2017 at 11:14 pm #889435Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Simple Drop-Down Menu’ is closed to new replies.