• Hi Everyone,

    I’d like to add a search box to my header — just above Contact Us on main navigation (https://www.landmarktaxgroup.com). What coding is needed and where would I put it in header.php?

    I found this code in the WP forum, but not sure if it applies to my site and where I would paste it:

    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
    <div><input type="text" size="18" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
    <input type="submit" id="searchsubmit" value="Search" class="btn" />
    </div>
    </form>

    Any assistance is greatly appreciated. Many thanks.

    Michael

Viewing 7 replies - 1 through 7 (of 7 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    We can’t exactly instruct you where to put it because you’re using a custom-built theme. Can you contact your theme’s creators regarding this?

    Thread Starter Landmark Tax Group

    (@landmark-tax-group)

    Thank you, Andrew.

    Unfortunately, the company won’t be able to assist me.

    As Andrew wrote,try to contact the theme creators.
    In case that’s not possible,i’m giving you a hint: Place the code you found at the bottom of div class=”social” (located in header.php) and then fix the positioning with CSS.
    If you can’t manage it yourself, consider hiring someone @ WordPress Jobs

    Thread Starter Landmark Tax Group

    (@landmark-tax-group)

    Thanks, X. I will try that.

    As an aside, I wasn’t aware Forum members/moderators were prohibited from advising on custom-built themes. I will keep that in mind.

    I appreciate everyone’s input, thus far.

    Michael

    I wasn’t aware Forum members/moderators were prohibited from advising on custom-built themes.

    Not exactly. Please review this:
    https://codex.www.ads-software.com/Forum_Welcome#Commercial_Products

    Thread Starter Landmark Tax Group

    (@landmark-tax-group)

    I understand the aforementioned code should be pasted into the header.php, however since I wouldn’t know how to make the adjustments using CSS, I don’t feel comfortable risking the integrity of the original code.

    Since we’re not in a position to hire for this programming task, I would be happy to exchange favors should a need for my company’s services arise. Anyone interested is welcome to contact me.

    Thanks again for everyone’s help.

    Michael
    Landmark Tax Group

    Closing the thread per forum rules.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Need help with adding a Search box to header’ is closed to new replies.