The reason for your not being able to use before
and after
is because when you’re calling wp_nav_menu()
with a default fallback of wp_page_menu()
, which does not have a before
and after
arguments.
Refer to line 171: http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/nav-menu-template.php#L137
Apparently the menu you are trying to get does not exist (has no items) the !$menu
is true
. Make sure you have created a menu in Appearance > Menus
and set it to a default one, or query for an existing one, or customize the fallback function, otherwise wp_page_menu
will be called, simply listing all the pages.
Related Posts:
- Two Navigation Menus – secondary nav is including main nav
- Opinions and recommendations on the best barebones base theme [closed]
- Customizing a WordPress theme without changing it?
- What is the role and history of the $content_width global variable?
- How to Link External jQuery/Javascript files with WordPress
- “Unexpected error” on update requests
- Custom Taxonomy-specific JavaScript
- Any official way to create an admin theme?
- Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?
- Loading template files from a subfolder in my theme?
- Building useful features into your theme
- Multisite: setting theme and options when a new blog is created
- Editing theme files and access to the Code pages only to super-admin?
- Change Default Image HTML
- Two Navigation Menus in Themes Produce the same menus?
- How to delete default themes
- Extra User Profile Field Upload File / Image
- Edit raw HTML of the landing page
- Problem : deletion failed, the theme requested does not exist
- Theme Activation, Create Database Tables
- Will activating a different theme preserve custom settings to current theme?
- Can I apply a WP theme to a specific custom page template?
- remove rel=next on home page but not others
- How to trigger function on theme delete?
- Setting a static home page and blog page without using the settings
- Possible to put header-{your_custom_template}.php in subdirectory?
- Renaming the Twenty Fourteen WordPress theme
- Protect changes made to the theme when updating
- Theme Development Admin Area [closed]
- How to set a single theme directory on a multisite blog?
- How to remove background image from post navigation elements?
- Static page not working
- Custom options below pages/posts editor?
- how to remove category nav from Bueno (WordPress Theme) header [closed]
- Problem of running development copy of WordPress on WebMatrix?
- How to create different navigation for registered users in WooThemes Canvas?
- Different logo on homepage
- the_content() is not displaying content, why? [closed]
- What is the correct way to integrate wordpress with another php application?
- Customizing page content layout
- Tips for managing code when developing a parent theme framework
- What Generated Classes and IDs That Is Always Used On All Themes?
- Trying to uninstall a theme, but it’s hijacking my home page
- Using the same database on another Subdomain
- How To Show Different Footers For Different Post Types Pages?
- A thin line between native wordpress bahaviour and 3rd party themes
- Create a Page template selector page
- How to include stylesheet in custom admin using parent_slug
- Custom fields not displaying on front end
- My blog suddenly can’t find my stylesheet?
- Customizing 1 theme for multiple blogs in a multisite setup
- Is there any way to modify images from a theme using the web interface?
- Get the name WordPress default theme in the core
- Default and warning messages & no login
- dynamic image path within a javascript file
- Display ads by location [closed]
- WordPress Dashboard Problem [closed]
- Theme Dev | Convert Template to Theme
- Target Internal Link Of Another Page On Website
- Work on theme files on a server & browser preview before installing it
- Create a child Theme or custom Theme
- Theme Options Menu Item – Permission Issue
- Static front page displaying twice
- Static posts page is not working
- How do I remove the hamburger menu from the Twenty Twenty Four theme?
- How to schedule Automatic WordPress Core and specifics Plugins updates for specific time a day
- Create Custom Attachment Template That is Processed from Plugin Folder?
- Will I lose the pages I’ve created within a default WordPress theme when adding a new theme?
- How can I add text on top of slideshow? [closed]
- How to remove date, author and comment count from Chameleon search results page
- Two column layout in WordPress?
- Display Headings on Index page in different font sizes
- How to remove a settings section from the Theme Customization API preview pane?
- Index page is not working
- Theme title in admin shows full path [closed]
- Event Organiser breaks the theme [closed]
- Error when installing theme – “failed to open stream: No such file or directory in…”
- disable default widgets in Responsive theme
- WordPress Theme Breaking on Migration to Live Site [closed]
- After installing a free theme, my wordpress turns into text mode when accessing remotely
- Theme seems to have different options on wordpress.com and own-server install
- Does WP, php, or a current framework (woofoo / genesis, etc). Offer a way to schedule text / bg color changes?
- Get data from Theme Options and use them into meta options field in custom post type
- different theme in one website
- how would I change background color of a theme using a plugin?
- Multiple sub directories for theme template pages
- Jquery Theme Roller to WordPress
- Implementation of language_attributes function
- get_pages Not accepting my query
- Cannot update a file for my theme
- Date based CSS/theme
- How to get the theme directory URI?
- Blackberry mobile theme redirection
- Twenty Ten theme – how to put a different header banner on every page
- List of categories instead of dropdown menu selector in admin options
- one page wordpress theme
- Child theme breaks after update of master theme
- Insert the current theme header into an external HTML/XHTML file
- How to remove the tripadvisor logo from the wordpress theme?
- How to use one git (github) repository for version control for multiple themes