WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. LauraDon
    Member
    Posted 1 year ago #

    Hi,

    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?

    thanks

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

  2. alcab
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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?
    thanks

  4. alcab
    Member
    Posted 1 year 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

About this Topic

Tags