Nav Menu Images
[resolved] Image AND Text (4 posts)

  1. LauraDon
    Posted 3 years ago #


    This is a great plugin, however is it possible to have an image AND text in the navigation? If so how can i achieve this?



  2. alcab
    Posted 3 years ago #

    Hi LauraDon,
    You may find some answer here http://blog.milandinic.com/2012/11/23/nav-menu-images-developers-guide/

    but it's quiet hard to figure it out... try and come back when you succeed.
    For me I always get a bad answer with an error message lije Syntax Error, wich is very disapointing...

    ... but the answer is really closed to this...

  3. LauraDon
    Posted 3 years ago #

    Thanks for your reply, but i've been unable to get this working. I have posted a comment to them, so i'm hoping that they reply. I was editing php file for the plugin nav-menu-images.php, is this the file that you were editing?

  4. alcab
    Posted 3 years ago #

    Hé. I got it.
    Just copy the code bellow in your functions.php and you see now text and images in your nav menu.
    #### code from http://blog.milandinic.com/2012/11/23/nav-menu-images-developers-guide/ ###

    function md_nmi_custom_content( $content, $item_id, $original_content ) {
      $content = $content . '<span class="page-title">' . $original_content . '</span>';
      return $content;
    add_filter( 'nmi_menu_item_content', 'md_nmi_custom_content', 10, 3 );

    you can edit the span tag to get what you want.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Nav Menu Images
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic