WordPress.org

Forums

Custom Menu Images
[resolved] [Plugin: Custom menu images] After uploading images, defaults menu text appear as well (7 posts)

  1. zedez
    Member
    Posted 4 years ago #

    Hi There,

    everything works like a charm, manage to set to width of each image of the menu bar. but there is a problem, after updating the images into the menu, the default text in the menu appear as well, on top of the uploaded image. How can i hide the default text once an image is uploaded? Thanks

    http://wordpress.org/extend/plugins/custom-menu-images/

  2. zedez
    Member
    Posted 4 years ago #

    hi there any helpful souls?

  3. ashok_m
    Member
    Posted 4 years ago #

    [resolved] using wp_nav_menu using the arguments after and before like this 'link_before' => '<span class="class_name" >',
    'link_after' => '</span>'

    Then class_name in css style display none.Text will be disappear.

  4. zedez
    Member
    Posted 4 years ago #

    Hi there, thank you for your reply.

    I added the given code into the end of "wp_nav_menu"

    but the website displayed a line of errors.. eh how should I add in the code?

  5. JsonB123
    Member
    Posted 4 years ago #

    This seems to be more a product of incorrect CSS handling than something that is the plug-in's fault.

    You'll need to handle "image replacement" correctly on your text. To handle this you shouldn't need to apply any special class / ids to your wp_nav_menu code as it spits out one already with it. Use Firebug (firefox extension) or look at the source code to see what that is. It should be something like .menu-item. See the Codex page for wp_nav_menu to add your own classes and set up an id.

    Once you have your class that appears on every list item, simply use a CSS rule like

    .menu-item a { width: 350px; height: 75px;
            background: url("images/header-image.jpg");
            text-indent: -9999px; }

    This will cause the text to offset and keep the image in place and clickable. You need to make sure you also display your clickable link as a block level item.

  6. anabelle
    Member
    Plugin Author

    Posted 4 years ago #

    Indeed,

    This plugin is not intended to make the text in your menu disappear, it justs sets some css with background images, from there on, you will have to do it.

    The tecnique we use is the same as JsonB123, is called "CSS image replacement" in case you want to search more.

    In fact we use this plugin and this same tecnique to do multi state images, with default, hover, and active states. This is done combining CSS image replacement with CSS Sprites.

    :)

  7. zedez
    Member
    Posted 4 years ago #

    hi JsonB123 and anabelle, thank you for your advices and helps.

    I have just tried out and it works! now I would just need to tweak abit on the css to make the navigation menu look nicely, as im using the default twentyten template.

    once again, thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic