Tagged: x
-
AuthorPosts
-
March 20, 2017 at 4:29 pm #1414211
How do I add an image that points to an url, on the navbar located just behind the search button to the right?
I have tried with the css style (.background-image) but I don’t know how to put an hyperlink to it (Guess it only works with html codes)
So I’ve also tried with an html code (put an html code to the _navbar child theme). But there I don’t know how to place it right behind the search button 😀Hope you can help – Thanks!
March 21, 2017 at 6:00 am #1414775Hi,
Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
March 21, 2017 at 12:11 pm #1415229Its brudleyp.fo – and I want a small english flag image just behind the search button on the navbar, that I will link to an english page.
March 22, 2017 at 1:34 am #1415859Hi There,
You already have a child theme right? Please open and edit your child theme’s functions.php file and add the code below:
function x_navbar_flag_navigation_item( $items, $args ) { if ( $args->theme_location == 'primary' ) { $items .= '<li class="menu-item x-menu-item x-menu-item-flag">' . '<a href="URL OF YOUR ENGLISH PAGE" class="x-btn-navbar-flag">' . '<img width="24px" height="24px" src="IMAGE URL HERE" />' . '</a>' . '</li>'; } return $items; } add_filter( 'wp_nav_menu_items', 'x_navbar_flag_navigation_item', 9999, 2 );
Replace the URL OF YOUR ENGLISH PAGE with the link of your English page, and the IMAGE URL HERE with the actual flag image URL. Make sure your flag image is relatively small.
Hope it helps, Cheers!
March 27, 2017 at 3:32 pm #1422158Thanks Friech, its working perfectly 🙂
March 27, 2017 at 6:12 pm #1422308We’re delighted to assist you with this.
Cheers!
-
AuthorPosts