Site logo

Archived topic

Moving Search icon to the right on mobile..

6 replies · Started by Peery on October 27, 2019

Viewing posts 1–7 of 7

See attachment... Is this possible?

attachment

/* Adds subscribe button on Mobile ONLY */
add_action( 'generate_inside_mobile_header','my_account_mobile_menu' );  
function my_account_mobile_menu() { ?> 
	<div class="mobile-bar-items menu-item-float-right">
		<a class="button go-premium" title="Subscribe" href="https://eqtoption.com/subscribe/">
			<span>Subscribe</span>
		</a>
	</div>
<?php }

Currently how I am calling the button... Thanks! ;)

Hi there,

try changing the priorty of your hooked element so this line:

add_action( 'generate_inside_mobile_header','my_account_mobile_menu' );

becomes:

add_action( 'generate_inside_mobile_header','my_account_mobile_menu' , 5 );

This should add it before the mobile menu items.

Perfect... but, now.... This happens..

screenshot

Button stays above when search in focus.

Edit this line to give the subscribe element a new class:

<div class="mobile-bar-items menu-item-float-right custom-mobile-bar">

Then use CSS to sets it z-index to zero:

.custom-mobile-bar {
    z-index: 0;
}

David.. you are the man! Thank you very much... I knew it had something to do with z-index just didnt know which/where to put it ;)

It took me a couple of attempts lol
You're welcome

This archived topic is closed to new replies.