Wordpress: How to display submenu menu in parent menu - php

I need help for Wordpress
if parent menu page data is empty in Menu then I want it to display its first sub menu data in wordpress
please help how this can be done

I am not sure that you would like my idea or not but I just want to suggest you about the custom links.
STEP 1 First need to create a page suppose ABC and then add the content into ABC page.
STEP 2 After that go to your appearance menu section and create the custom link, now into the URL tab add the URL of your ABC page like this http://localhost:808/wp/abc/ and gave a name to the menu Test
STEP 3 Then add the ABC as a submenu of Test custom menu
Thanks

Related

Create nav menu from course category LearnPress plugin on wordpress

I have two course category Mathematics and Physics. Each category have course relevant to it type. I want to create Nav menu on my website via this category. I mean I want to take Mathematics and Physics to be as menu.
Example: While user click on Mathematics menu it show only which courses have category Mathematics.So on. Please check below snapshot:
You need to go appearance > menu and select your menu location than after you can see your categories in just left of the screen. you can select your category from the list and click on the add to menu. After it just click on the save menu and check on your fronted side.
check the screenshot.
If you are not able to see your category list in this section than you did the mistake in your register_taxonomy() function.
you are having three options.
1)you can use the custom links for menu.
2)second option is you can check with firebug your custom category is there with display none remove that css from firebug.
3)third option is check the plugin and customize the register taxonomy function.
Found the quick and best solution for this. Please use this WordPress plugin - Custom Taxonomies Menu Widget by Ade Walker
This is available as Widget
https://wordpress.org/plugins/custom-taxonomies-menu-widget/

Wordpress: open page at bottom of parent page

I've been struggling with this for a couple of days now and can't think anymore.
I've created a template for a particular page for event menus and within that page I have a sub menu. This sub menu has event menus. For the purposes of example: Item 1, Item 2 and Item 3
These menu items are their own pages.
The submenu should open the pages in this template. Page layout example below:
Header
Main Nav
Banner Image
Content for Events
Event Menus (Item 1 | Item 2 | Item 3)
Menu Content
Footer
Menu Content switches out by clicking on the menu items, but the Content for Events stays static.
I currently have it working by adding a $_GET variable to the end of the links, but I've hard coded the menu. I don't want this because then the client can't make their own menu changes and edit their menus. (The amount of changes so far has been ridiculous.)
I've put the Event Menus and Menu Content into another nested loop, theoretically so it reacts inside the loop, though initial tests with this have failed.
I'd really like to keep the dynamic nature of Wordpress' menu system, but can't get this to work without hard coding.
At this point I'd be happy with direction on where to research.
Thanks.
If your HTML for the menu content is not too unwieldy, you could potentially drop each menu into a Wordpress Page, where the client could edit it. Simply create a Wordpress page for each menu, drop in your menu content, save it, and make a note of the Page's ID number.
Then, in your template, you can pull in the menu content by getting the Page with something like this:
<?php
// Menu One is content in Page ID # 14
$menu_one = get_post(14);
echo apply_filters('the_content', $menu_one->post_content);
?>
For your reference, get_post on Wordpress Codex: http://codex.wordpress.org/Function_Reference/get_post
On your actual page, what you could do instead of using a GET to grab each menu, is just go ahead and load all 3 menus on page load. Using CSS, you can hide the two you don't want at first and just show the default one. Then using some JavaScript events on the menu item links, you can show the clicked-on menu and hide the other two.
I've put a few notches in my oop and WP programming since asking this question. I think the better way to do this is a custom post type and change the wp_query object with parameters based on the link which can probably just be controlled by post ID. But it would still allow for a menu to be added to the "archive" page that controls the posts. Ultimately allowing client control of the menu, but still having a dynamic ability.

How to create submenu/drop down menu in wordpress 3.8.1 Bizway theme

Is the anyone who can help me with creating submenus for my wordpress site?
I want the Menu structure to be like this and to be a dropdown list menu:
Home
About Us
Products
L'Oreal Products
Eco Kids Products
Bonacure Products
Services
Gallery
Awards
Contact Us
Am still new to wordpress,please take it easy on me..;-)
Here is a link to the site:
http://hairimpressions.azurewebsites.net/
Thanks in advance for your help
First create page which you want to put as a sub menu then go to appearance>menu in that select page and add in to menu but just put under the main menu/or the page you want to create a submenu in...

How to add same name menu items in joomla menu

On my Homepage I have 2 menus, for the top main menu initial element is "HOME". Now on my footer menu I wanted to start with the same menu item so i checked "Main Menu" from administrator and here it is mentioned like this->
HOME (Alias: home)
Articles ยป Featured Articles
So i created a new Featured article as "home" and it is successfully created. Now when attaching this to my footer menu I am getting this error -
Warning: Save failed with the following error: Another menu item has the same alias in Root. Root is the top level parent
Let me know what I am doing wrong, and how do I create Home menu item that do the same stuff, i.e on click return to the main site(http://localhost/mysite) currently main menu item is doing that and I want to do the same from the footer menu Home item as well but it is not creating successfully :( Help me plz
PS- Even "About Us" article that is on my main menu is not including at my footer menu with the same error.
If you want to use same menu item into multiple places like main-menu and footer. So you can use menu type called Menu Item Alias. To do this, create a new menu then select the menu type to Menu Item Alias as shown below:
Joomla 2.5
Joomla 3.0
Expand system link tab and select menu item alias
Then add the name you want and then from right side select the menu item that you want to show on this menu item like shown here:
Joomla 2.5
Joomla 3.0
Then save it. Hope this may help you.

How Set Child Category under Parent Category in Joomla Virtuemart

Here I have a problem, when I create a subcategory it goes to main menu and I need to show it in body where main category shows .. Simply I need my category setting like this, so how I can do this please.
Both sites use "Virtuemart". What do I need to do for this kind of result?
I need this http://www.empiremedia.biz/ Like this http://www.unitedbroadcast.com/
Anyone who well experienced in Virtuemart. or how i can solve my issue ,please guide or suggest me what need to do? Or where do I need to change core files?
Try checking "Show Children Category" in the Templates tab of the Config menu. (VM 2.0.10)
To do this:
Go to Virtuemart > Configuration
Click the Templates tabs
Select the "Show Children Category" check box
Save
Option 2:
Go to Virtuemart > Products > Product Categories
Click the product category you want to edit.
In the description box type in the name of your sub category then make it a link to that sub category... if you need the link navigate to it in your browser.
Again I can't stress this enough if you have having THIS MUCH trouble with VM I strongly suggest getting a book or hiring a developer. Please consider buying a VM book.
set your homepage or any of your pages 'menu item type' to virtue mart category layout.
on your admin page go to
menu > main menu
click 'home' or any other page
select virtuemart category layout on the menu item type*

Categories