This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Tagged: 

Search bar in the header

  • Creator
    Topic
  • #17825
    mirecek5
    Participant

    Hello!

    Please, is there any way how to put the search bar to the header instead of the sidebar? I am using quite old version of the template, maybe this feature is already included in some of the further versions…?

    Thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #17831
    Jason Bobich
    Keymaster

    Hello,

    What version of Barely Corporate are you using?

    #17836
    mirecek5
    Participant

    Hello!

    I´ve just updated to the latest one. The site is here: http://www.cevelova.cz

    #17837
    Jason Bobich
    Keymaster

    So this would be a customization you’ll need to make to the theme. You’ll want to hook your custom function displaying your content to the “themeblvd_header_addon” action from your child theme‘s functions.php —

    http://dev.themeblvd.com/tutorial/actions/

    http://dev.themeblvd.com/tutorial/primary-framework-action-hooks/

    Here’s how you display a searchform in WordPress:

    http://codex.wordpress.org/Function_Reference/get_search_form

    For example, you could probably even just do this, and be left with main just CSS modifications.

    add_action('themeblvd_header_addon', 'get_search_form');

    Or if you require more control over the markup —

    function my_search_form(){
    	?>
    	<div class="my-search-form alignright">
    		<?php get_search_form(); ?>
    	</div>
    	<?php
    }
    add_action('themeblvd_header_addon', 'my_search_form');
    #17845
    mirecek5
    Participant

    Thank you very much for your help.

    I will try it. But as I´m not a website developer, it sounds quite complicated.

    I see that you have already included the search function into the menu of other templates like Alyeska or Commodore.

    Please, don´t you plan to offer it for the other templates too? Or as a plugin? I think I would not be the only one to appreciate it.

    Thank you very much!

    #17847
    Jason Bobich
    Keymaster

    Unfortunately, this will most likely not something that will get added to the Barely Corporate theme. And this is something that would be specific to each theme’s design, and not something I’d put in a plugin unfortunately.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Barely Corporate Responsive WordPress Theme’ is closed to new topics and replies.