Taxonomy Page Parent Menu Collapsed

WordPress allows you to create your own menus in the admin area, to do this you can use the function add_menu_page(). When this menu item is in place you are also able to add sub-menu items to the page that can be used to make your own custom option pages under this menu by using the function add_submenu_page(). Using the submenu page you can add any URL you want to

Read more...

Programmatically Assign Menus To Theme Locations In WordPress

In this tutorial we are going to look at how we can programmatically set a menu to a menu location. In WordPress you assign a menu to a location by going to the menu page in the admin area and click on manage locations this will take you to the page /wp-admin/nav-menus.php?action=locations. From here you will see a list of all the locations assigned to your theme with a dropdown

Read more...

Display Submenu Only On Parent Page

The in-built WordPress menu system allows the content author to create a menu by a simple drag n drop interface, it allows you to select existing posts, page or let you create custom links to add to the menu. Using the drag n drop interface you can select child elements on the menu. When you output the menu on your theme using the function wp_nav_menu() WordPress will automatically create the

Read more...

WordPress Menu Item Icons

In WordPress 3.8 the core had a change to all icons, they now use Dashicons which are fonts that mean you can display an icon by simply adding a CSS class. This can change a few things in the admin area of your application, for example when adding menus to the admin area you might need to change the icon to use a CSS class. If you have created any

Read more...

Style A Specific WordPress Menu Item

The following code snippet will allow you to style a specific menu item differently to the other items. When WordPress creates a menu it will use the menus setup in the WordPress admin, this interface gives the user full flexibility of the what items go in the menu and where they are positioned in the theme. WordPress will automatically add ID's and Classes to these menus so that you can

Read more...

Programmatically Add Menu Item

WordPress comes with a default menu system which gives full control to the admin user of the site to change or create as many menu items as you want. To access the menu system in the admin area you just need to go to Appearance -> Menu. From this screen you will be able to see all the menus that currently exist on your WordPress site, you can select any

Read more...

Display Menus When Location Is Assigned

In WordPress the user can create their own menus in the CMS area by just going to Appearance -> Menus. From this page you can then assign these menus to locations in the theme by choosing the theme location for the menu. These theme locations are setup by the theme developer and is done by using the function register_nav_menus(); The register nav menu function can be placed in the functions.php

Read more...

Disable Changing The WordPress Theme

The problem with having a multi-author blog is that you have a lot of users which have access to the admin area of your WordPress site. When they have access to your admin site they have access to change everything about your blog. Yes you can use your access roles and set the different capabilities, but what if you have multiple admin users but you only want the super admin

Read more...

Add New Menu Items To WordPress Admin

If you are a plugin or theme developer then you will get to the stage where you need to add a link to your plugin or theme settings page in your WordPress admin area. The settings page will allow you your user to customise the plugin or theme in anyway they want. There are different ways you can add links to your plugin or theme settings page. Some people like

Read more...

WordPress Theme CSS Starter

Creating a WordPress theme can be lots of work, but the basic HTML for themes are normally quite similar. Each theme will have a way of looping through a list of posts to show the most recent posts, or to display all the posts in a category. The HTML to display a single post inside the single.php will mainly be the same on any theme you have the header for

Read more...

1 2