-
AuthorPosts
-
March 19, 2014 at 12:06 pm #240017
Hello,
I have been trying to add a search form to my website with a shortcode by addingadd_shortcode('search_sc', 'get_search_form');to functions.php. When I add the shortcode to a text field in the avia layout builder the search button appears on top of the search bar and not on the right side. How could I fix this?
Thank you.
Edit: or is it possible to add a search form like in the header to the main part of the website? I would prefer that since i like the live search and especially the styling.
-
This topic was modified 11 years, 7 months ago by
marcelwachter.
March 19, 2014 at 12:08 pm #240022it looks like this:
March 19, 2014 at 8:08 pm #240321Hey!
Please go to Enfold theme options > Header > Extra Elements and check “Append search icon to main menu”
Cheers!
YigitMarch 19, 2014 at 8:12 pm #240324Thank you but I have already checked this. But I would like to have the search bar on the content part of the website.
March 20, 2014 at 10:17 am #240606Hi!
On what part of the page exactly do you want the search bar to show? You can append the search bar anywhere you like. Add this on functions.php:
add_filter( 'avf_content_search', 'avia_append_search_nav', 10, 2 );If you want the search icon to show on the single post content, edit single.php. Find this code on line 40:
//show related posts based on tags if there are any get_template_part( 'includes/related-posts');Below, add this code:
echo '<nav class="main_menu content-search"><div class="avia-menu"><ul id="avia-menu" class="menu">'; echo apply_filters('avf_content_search', "", 'fallback_menu'); echo '</ul></div></nav>';Add this on Quick CSS:
.main-menu.content-search { width: 100%; display: block; position: relative; margin: 0; }You’ll the search icon at the very bottom of the posts.
Regards,
Ismael -
This topic was modified 11 years, 7 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
