Tagged: , , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1057201

    I have achieved it from this PHP script and Javascript, but it takes a little while to place in correct position:

    # Add an Icon Button
    add_action('ava_inside_main_menu', function() {
    	
    	echo '<li id="menu-item-login" class="noMobile menu-item menu-item-search-dropdown menu-item-avia-special">';
    		echo '<a href="http://marinapedrena.es/area-privada/" rel="nofollow" aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"><span class="avia_hidden_link_text">Buscar</span></a>';
    	echo "</li>";
    });
    
    # Place the button on the left side
    function change_menu_position() { 
    ?>
    <script>
    (function($){
    	$('#menu-item-login').insertBefore($('#menu-item-search'));
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'change_menu_position');

    GIF of the problem:

    View post on imgur.com

    • This topic was modified 6 months, 4 weeks ago by  semarac.
    • This topic was modified 6 months, 4 weeks ago by  semarac.
    #1057288

    Hey semarac,

    That happens because the page is loaded first before the js script gets executed.
    Try to enable/check Page Preloading in Enfold > Theme Options.
    Hope this helps.

    Best regards,
    Nikko

    #1057403

    Yes!! It works!

    Thanks!!

    #1057435

    Hi semarac,

    Glad you got it working for you! :)

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.