Search code examples
phphtmlwordpressheadernavigation

Remove Wordpress navigation labels?


I got a plugin that uses images for nav items in the Menu GUI in the Wordpress dashboard. The nav label is still being generated, and I'd like to remove them. I tried leaving them blank, but it just removes the Menu item.

This is how the theme is calling the nav in header.php:

<?php 
$show_member_menu_sticky = false;
 if ( $data['op_instamember_integration'] == 1 && function_exists('is_stmsmember_logged_in') ) {
if ( is_stmsmember_logged_in() ) // IM members is logged in...
    $show_member_menu_sticky = true;

if ( function_exists('is_stms_admin') ) {
    $stms = get_option('stms_settings'); // load InstaMember global settings...
    if ( isset($stms['global']['admin_unlock']) && $stms['global']['admin_unlock'] == 1     && is_stms_admin() )
        $show_member_menu_sticky = true;
}
} else {
if ( is_user_logged_in() ) $show_member_menu_sticky = false;
}

if ( $show_member_menu_sticky )
member_menu_sticky();
else
menu_ibt();
?>

example


Solution

  • Instead of using a plugin for making images the navigation, you can load the images easily. Using this method will get the images to load and NOT the label.
    Step 1: Go to Dashboard>Appearance>Menus
    Step 2: Create a menu and set it as your navigation menu.
    Step 3: In the menu, add a custom link.
    Step 4 IMPORTANT: Here's where you add the images. In the URL part of the custom link, add the URL you would like to link to. In the navigation label section, add the HTML for the image (yes, it can handle HTML). So, you would want something like this in the navigation label section: <img src="the URL of where your image is">.