Site logo

Archived topic

Showing icons on mobile nav

9 replies · Started by David on September 26, 2017

Viewing posts 1–10 of 10

I am building a simple one page site and would like to replace hamburger icon on mobile with social icons and maybe a phone icon? i will no longer need menu as this will be the only page for the site. add icons as custom links to menu? or use social menu? and how do i replace hamburger icon with these?

thank your your response i am not heavily versed in html so i am having trouble finding my mobile header html to insert into the php function. I have an elementor template that inserted with a hook but when doing that i loose functionality of sticky header. that is why i am trying to add icons to customizer header.

You should be able to place your Elementor template inside the hook using the shortcode:

add_action( 'generate_inside_mobile_header','tu_mobile_header_html' );
function tu_mobile_header_html() { ?>
    <div class="mobile-header-content">
        <?php echo do_shortcode( '[your_elementor_shortcode]' ); ?>
    </div>
<?php }

Thank you leo and tom both for your hard work and support. This worked perfectly tom! but it got me thinking can i do this with the primary nav or main site header as well if so could you provide me a code snippet to accomplish this? Thanks in advance and keep up the great work!

I am able to get it to show above site header using code below but it doesnt replace existing header just sits above it and does not inherit sticky properties.

add_action( 'generate_header','tu_site_header_html' );
function tu_site_header_html() { ?>
    <div class="site-header-content">
        <?php echo do_shortcode( '[elementor-template id="81"]' ); ?>
    </div>
<?php }

Thats it leo! perfect problem solved thank you guys so much

Glad we could help :)

Now that i have the elementor template as primary navigation a new issue has come up. When initial page load is performed the elementor template flashes un-styled content. For example the default social icons color flashes quickly then my settings are applied.

This archived topic is closed to new replies.