This:
<nav>
<?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>
</nav>
.
Should be:
<nav>
<?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'menu_class' => 'main_menu' ) ); ?>
</nav>
The css:
.main_menu {
font-size: 14px; // example
}
.
Learn more here: wp_nav_menu
Best of luck,
Sagive
Related Posts:
- Mega Menu Walker
- start_lvl Ignored in Custom walker_nav_menu
- Displaying Logged-In User Name in WordPress Menu
- Hide main div if wp_nav_menu is empty
- Check if a menu is empty?
- How to remove a metabox from menu editor page?
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- How to add active class to custom menu using while loop and wp_list_pages
- WordPress menu deletes when trying to add a hook
- Logout and redirect using the WP Menu
- Have CSS Class Added with `is_page()` WP function
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Run a filter when a walker runs
- Menu — How to add “current-menu-grand-ancestor” css class
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Automatically adding new post categories to menu
- Add data attribute to each li in menu
- Unique icons next to each WordPress menu item
- Child page menu in sidebar
- Title Case WordPress Menu Items
- WordPress Quick Question . How to Get Parent Link in Submenu in My Code
- Detecting classes, adding widgets, and adding divs in with a Nav Walker
- How to change menu order item
- Add item to top of menu using a filter in functions.php
- Register a menu – Error Header
- Add login hyperlink to secondary navigation menu
- Add value to new attribute inside WordPress menu items
- Get the name of menu item with wp_nav_menu
- How to add aria role and schema markup to custom walker container
- How can I use custom menus with a Bootstrap WordPress theme?
- Nav-Menu not showing up
- Remove submenu item from list
- Dynamic Menu drops pages?
- how to changes mobile menu toggle breakpoint in WordPress
- How to display already created menus via php?
- Providin exception to WordPress wp_nav_menu Custom CSS Classes
- How to put 2 php codes in functions.php without site crashing
- Menu not updating for logged in users after redirect
- Add element after navigation element title don’t works like I expect
- Add parent menu item in sub-menu in custom nav_walker
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- Pulling a variable into the wp_nav_menu function
- How I can add div to menu?
- WordPress adding in site URL to header links
- Custom Navigation Bar JSON Syntax Error in JSON at Position 0
- How to add different menu items on different menus?
- How to Add Image to WordPress RSS-Feed with no Plug-in?
- Enqueue Javascript Correctly for 3.5
- Cleanest/Fastest way to avoid calling and retrieving data from the database multiple times?
- Add footer.php to WordPress child theme
- WooCommerce – Display variation custom field value [closed]
- Restrict WordPress File Type Uploads by User Type
- Woocommerce HTML email option unavailable
- Use template for posts with a particular category grandparent
- How to slow down server response
- Click loads template via ajax
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Use menu link or onClick to set a variable
- Automatically remove a canceled order in Woocommerce
- WordPress add post format support not working
- Create highly customized submenu (possibly using wp_list_pages)
- $wpdb->wp_users returning empty value for
- WordPress Custom field Colors
- php syntax : [ && ] between commands [closed]
- Which PHP page is the Default Posts Page
- Need to put a script above tag in header.php – WP 5.7.1
- Sending a custom form data in email through WP Mail Function
- Add data-id attribute to child page links
- How to use array in function to get only value I want
- How to add PHP code in functions.php wordpress
- add_filter function concatenate string and locate_template function
- How to return a string that has a jQuery and Ajax inside in a shortcode?
- get_page_templates only return templates with “home” in the filename
- Function to call either single post or category
- Updating Metadata with Shortcode
- Woocommerce – Exclude variation attribute on specific variation
- How do I add a function to parent theme
- Are there any drawbacks on opening a session_start in functions.php and header.php?
- Add Pre-Defined Value to Click Counter in WordPress
- How to move a post from one category to another
- Show data obtained from a function and place it in a shortocode function
- How to override theme’s public static function inside of a trait?
- Delete empty title_tags, find a h1 heading and echo it
- WP_Query To Display Product Of Brand On Taxonomy Page
- ajaxurl usage for a custom function
- oembed facebook link?
- Open/closed function [closed]
- Search for images that width and height is more than 500
- wordpress ajax return 0
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- site_url() returns with additional backslashes
- Overwriting a Shortcode
- WP Ecommerce: Display the “Order Notes” as column in the Sales Log [closed]
- if is_home(), change class of menu-item-225 of wp_nav_menu
- Change order that the menu is generated with wp_list_pages
- A next page function with shortcode?
- What is the wrong with this function to enqueue the scripts and styles to the theme? [closed]
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Custom plugin doesn’t show in admin menu – when code added, displays an empty page