Support Has Moved!

Please post all new questions on the new support system

Before posting a discussion topic, be sure to check out our Forum Rules and Support Policy.

Get design feedback and approval with our newest WordPress plugin, ProjectHuddle. Check it out →

Latest Struck Version is 1.06

Latest GridStack Version is 1.1

Latest Edition Version is 1.6

Latest District Version is 1.2.6

Latest ExtraNews Version is 1.4.9

Latest Aware Version is 1.4

Latest BigFormat Version is 1.4

Latest Bookcase Version is 1.54

Latest Ellipsis Version is 1.5

Search box showing on all pages

LucvanLoon's Avatar

LucvanLoon

13 Sep, 2015 10:59 AM

Hi,

I would like to add a search box on all pages as seen on the search results page (see attachment).

I've tried the code using a child theme from the following post, but this doesn't work.
http://support.themewich.com/discussions/district-wordpress-theme/1799-search-box-in-page-header

Could you assist/help me with this?

Kind regards,
Luc van Loon

  1. 1 Posted by Eric Schmidt on 13 Sep, 2015 02:54 PM

    Eric Schmidt's Avatar

    Hi,

    You would want to edit the page templates. It would be best to use a child theme so you don't lose your changes...

    http://support.themewich.com/kb/updating-your-theme/how-to-create-a...

    Copy page.php, template-full.php and template-contact.php to your child theme. You will want to replace the area that has the options button in the header area with the search box code. So replace this...

    <div class="verticalcenter cell">
                    <div class="six columns">
                       <?php echo $ag_page['button']; ?>
                    </div>
                </div>
    

    with this...

    <div class="verticalcenter cell">
                    <div class="six columns">
                       <?php get_search_form(); ?>
                    </div>
                </div>
    

    Eric

  2. 2 Posted by LucvanLoon on 13 Sep, 2015 07:50 PM

    LucvanLoon's Avatar

    Thank you Eric, that was exactly was I was looking for.

    Case closed :)

  3. Eric Schmidt closed this discussion on 14 Sep, 2015 02:24 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac