• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WordPress Tips, Code Snippets, and How To Tutorials

  • Home
  • Blog
  • Tips
  • Snippets
  • Tutorials
  • Contact

Menus

How to add or remove links on your WordPress menu

November 5, 2019 by admin Leave a Comment

Your WordPress website has a way to update the menu without using a plugin. You can add or remove links on your WordPress menu using the WordPress admin on there.

To update the WordPress menu on your website on there

  1. From the WordPress admin left menu you can click on appearance > menus
  2. From the WordPress menu page the top of the page has the name of the menu you are updating on there
  3. The left side of the page has different pages or posts that you can put into your menu
  4. The right side of the page has the menu
  5. To add a page or post to your menu you click on the page or post you want to add then click the add to menu button on there
  6. Then you click on the save menu button to save the menu

Then if that worked you would update and save the menu for your WordPress website on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, Menus, WordPress Admin

Remove the title from links in your WordPress navigation menu without a plugin

October 30, 2019 by admin Leave a Comment

On your WordPress website you may have a navigation menu at the top of the website that displays a title for the link in the menu if you hover the mouse over the links in the menu on there. You may want to remove those titles from the links in your menu on there. You can do this without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

/**
 * Remove menu title
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function no_menu_title( $menu ){
return $menu = preg_replace('/ title=\"(.*?)\"/', '', $menu );
}
add_filter( 'wp_nav_menu', 'no_menu_title' );
add_filter( 'wp_page_menu', 'no_menu_title' );
add_filter( 'wp_list_categories', 'no_menu_title' );

Now if that works for you it would remove the titles from the link in your WordPress navigation menu on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Links, Menus

How to add a search bar to your WordPress website navigation menu without a plugin

October 30, 2019 by admin Leave a Comment

If you have a WordPress website you may want to add a search bar to the navigation menu. You can do this without a plugin if you add this code to your functions.php file. You may want to backup your WordPress website before you make updates to the functions.php file.

/**
 * Empty trash automatically
 *
 * @author WPSnacks.com
 * @link https://www.wpsnacks.com
 */
function add_search_to_nav($items, $args) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '<li>' . $searchform . '</li>';

return $items;
}
add_filter('wp_nav_menu_items','add_search_to_nav', 10, 2);

Now if that works for you it would put a search bar in your WordPress navigation menu on there.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: Code Snippets Tagged With: Functions.php, Menus, Navigation, Search

How to add WooCommerce Cart link to WordPress menu

May 4, 2016 by admin Leave a Comment

If you are using WooCommerce for an online store plugin for your WordPress site, you may want to add a link to the WooCommerce Cart to your WordPress menu. Just follow these steps below to add a Cart link to your WordPress menu that links to your WooCommerce Cart page.

  1. From WordPress Admin Menu, click on Appearance > Menu
  2. From here on left side of page, find pages box
  3. Click View All
  4. There should be a page listed for Cart
  5. Click check box next to Cart page and then click Add to Menu button
  6. Move Cart link to where you want it in the menu and be sure to hit Save Menu

There you go, you should now have a link to WooCommerce Cart page in your WordPress menu. Hope this helps with your WordPress problem, enjoy.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, Menus, Plugins, WooCommerce

How to add a page or link to your WordPress Navigation Menu

October 24, 2015 by admin Leave a Comment

If you are using WordPress, you may want to add a new page or link to your WordPress menu. Just follow these steps below to add a page or link to your WordPress navigation menu.

  1. From WordPress Admin Menu, click on Appearance > Menu
  2. From here on left side of page, find pages box(or links)
  3. Click View All or add custom link if doing a link
  4. Find page you want to Add to menu
  5. Click check box next to page you want added
  6. Move new link to where you want it in the menu and be sure to hit Save Menu

There you go, your new menu item should now be in your WordPress menu. Hope this helps with your WordPress problem, enjoy.

If you like this then you should look up more of our WordPress Tips Code Snippets and Tutorials.

Disclosure: There are affiliate links on posts and throughout the website and if you use the links to make a purchase we may earn a commission from it. We link to these companies and their products because of the quality of the companies and not because of the commission we may receive from it.

Disclaimer: The information contained in this website is for general information purposes only and in no event will this website or its owners be liable for any losses or damages associated with your use of our website or content. We recommend that you make a backup of your website before you make updates to it. Click here to see our full Disclaimer.

Filed Under: WordPress Tips Tagged With: Links, Menus, Pagination, WordPress Admin

Primary Sidebar

Hey, We Deliver... Anywhere!

Enter Email Address below to receive our snacks via email:

Join Over 1200 Readers!

Jump To A Random WordPress Tip

Copyright © 2019 • wpsnacks.com