Archived topic
custom menu
3 replies · Started by limolab on June 16, 2020
Hello, i need to custom the header/navigation part of this site: https://aslto3.sviluppo.host/
because i want that the header/navigation will be exactly like this: https://forum.sviluppo.host/
the only 2 things that i'm not able to do is to add social icon and search bar in the main navigation.
Can you help me?
hope to be clear.
thanks
Hi there,
this topic provides a way to do that:
Hi, thanks.
But i'd like to add also two social icons.
is it possible to do that?
Thank you.
As you are using Font Awesome you can update code to this:
add_action('generate_inside_navigation', 'db_custom_navigation_search', 10);
add_action('generate_inside_mobile_header', 'db_custom_navigation_search', 10);
function db_custom_navigation_search() {
printf(
'<form method="get" class="search-form custom-nav-search" action="%1$s">
<input type="search" class="search-field" value="%2$s" name="s" title="%3$s" placeholder="%3$s">
<button class="button">%4$s</button>
</form>',
esc_url( home_url( '/' ) ),
esc_attr( get_search_query() ),
esc_attr_x( 'Search', 'label', 'generatepress' ),
generate_get_svg_icon( 'search' )
);
echo '<div class="navigation-icons">
<a target="_blank" href="#"><i class="fa fa-facebook"></i></a>
<a target="_blank" href="#"><i class="fa fa-youtube"></i></a>
</div>';
}
and then a little CSS to move them to the end:
.navigation-icons {
order: 40;
}