[Resolved] Move search div above title

Home Forums Support [Resolved] Move search div above title

Home Forums Support Move search div above title

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #217880
    Iván

    Hi Tom,

    I would like to mode the search div above the title page, like you did on your support forums page. I know editing HTML and CSS on webpages, but I don’t know how to do it in WordPress.

    How can I do that? And there’s any way to edit HTML of a certain page too?

    Thanks,

    Iván

    #217881
    Iván

    Sorry, by “mode” I wanted to mean “MOVE”: move the search dive above the page title.

    Thanks again.

    #217910
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This function should help: https://developer.wordpress.org/reference/functions/get_search_form/

    You can implement it in GP Hooks so it’s placed wherever you like 🙂

    #217923
    Iván

    I don’t understand it at all. What I have to do to edit the HTML of the forums page?

    Thanks,

    Iván

    #217928
    Iván

    I just want to do what you did in your forum page. Place the search bar before the title. I show you the image:

    Thanks

    #217929
    Iván
    #217950
    Tom
    Lead Developer
    Lead Developer

    Ah, didn’t know you were working with bbPress.

    I have this code added to the “Before Content” hook: https://gist.github.com/generatepress/4b720716451567b0a412790984b9cbaa

    #217958
    Iván

    Thanks so much, it works!

    But now the search bar appear on all the pages, how can I only show it on the forum page?

    Thanks again,

    Iván

    #218001
    Tom
    Lead Developer
    Lead Developer

    Make sure “Execute PHP” is checked in the hook 🙂

    #218056
    Iván

    THANK YOU!!! You’re awesome. Thanks so much!

    #218078
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.