I create a submenu for the pages of my website. Each page will have a different submenu in the header. For example:
Inicio: menu 1
Sala de Investigación: menu2
Estudios Bíblicos: menu3
how can I do this using the if statement
Im creating my website using wordpress. My old web page is:justiciadedios.com
Very easy.
Use Wordpress 3.0
Use the "Custom Menu" plugin to create different custom menus, one menu for each page.
Go to Appearance > Widgets and place several Custom Menu widgets wherever you want the menu, one widget for each Custom menu.
Download and install the Widget Logic Plugin: http://wordpress.org/extend/plugins/widget-logic/
Read the Widget logic instructions and use the PHP shortcodes to select which page each wiget will appear on. Have fun!
Related
I want to create a tutorial site like https://www.runoob.com/ by using wordpress. I want to create some pages, for example /java , and some subpages, for example /java/java-tutorial and /java/java-intro .
I want to show a navigation sidebar in each of these subpages. I want the sidebar list all links of the subpages. How to do it?
Thanks!
Add a Navigation Menu to Sidebar in WordPress
You can easily add navigation menu in your WordPress website using the WordPress dashboard. Login to your WordPress website and go to dashboard then-
Go to Appearance > Widgets
Under available widget area find your navigation menu you want to add.
Drag and drop the menu into main sidebar widgets area
Add a name of the menu and select from the drop-down where you want to use it.
Create a custom sidebar for WordPress website
There are a lots of plugins available for custom sidebar navigation menu. Here in this tutorial we are using Custom Sidebars — Dynamic Widget Area Manager plugin to create our custom sidebar for specific pages. This plugin offers you so many customization options. With the help of this plugins you can create multiple sidebar for multiple pages.
Download this plugin from WordPress plugin page and activate it. after activating the plugin go to your dashboard and then Appearance > Widgets. If the plugin is running successfully then you will able to see the option Create a new sidebar
From this page you can choose a name of your sidebar and add some description about it. If you want to create multiple sidebar then you should give a related name for each sidebar so that you can easily understand that which sidebar for which purpose. You can see all of your sidebar in custom sidebar section
Now from the Available Widgets area you need to drag and drop element you want to display in your sidebar.
For better understanding you can follow this article
I've made a custom menu (that is not default) in Appearance > Menus
How do I call it in php files?
I can only find tutorials how to call default menu or menu registered inside php with wp_nav_menu function, but how do I call custom menu made in wordpress's cms?
You have to add pages to the menu on the menu screen. Then, your theme will automatically show it on your website. Be sure to make it your Main menu at the bottom of the menu page under Menu Settings.
I am new to CMS development, I prefer the MVC concept for every job. But just know the client requested to develop a website built in WordPress. Everything is OK but I can't find to order pages in WordPress.
The case is: first I create a home page and then I create other pages, but the problem is every time I add new pages, it will be placed in my first menu.
So I want to move the home pages in first menu.
Please help, thanks.
You can create a custom menu (with the pages/links you want, and the order you want !). Then you can add that menu to be the new navigation menu (both header, and footer if you want)
References:
WordPress Menu (here you can find the step by step 'guide')
Just go to Appearance --> Menus and then you'll be able to create menus and edit at will. And if you need to create specific menus, see WP nav menu page. There you'll see several code samples, but you'll need something as simple as
<?php wp_nav_menu( array('menu' => 'Main Nav' )); ?>
I am implementing a new website with customized theme. I have added menus(structure-> Add menu) but its displaying only in the default theme.Its not appearing in my theme.How I can show the menu in customized theme
theme: I changed one html file to theme
drupal version 7.22
all menus are blocks and are displayed in regions of page
go to /admin/structure/block and put your menu block in proper region since different themes have different regions
Use ready module it will help to customize menu easily and also allow for multiple level menu
Nice menu
Good afternoon, I'm creating an "Areas" page on my Wordpress website with a page structure like this;
Home About Us Areas
- Wiltshire
-- Salisbury
-- Wilton
- Hampshire
-- Andover
-- Portsmouth
I'm looking for a way to generate all the links on the areas page with the parent of the town being the Title!
For example
<h2>Wiltshire</h2>
<ul>
<li><a href>Salisbury</a></li>
<li><a href>Wilton</a></li>
</ul>
What is the best way to generate these links within Wordpress?
Create the pages and then create a custom menu. Once registered add the menu items. Most themes have a navigation menu up the top. You can find the code which registers it in functions.php of the theme directory. If your pages have different functionality to regular pages, consider registering a custom post type and adding those instead of regular pages.
The theme which you use should support the Menu if you intend to use the Menu options in the Wordpress dashboard, check the Menu_User_Guide
If you wish to write code check the Horizontal_Menus