• Hi all. New to self-hosted WordPress solutions, and having an issue with a small project I’m working on. Any help would be greatly appreciated – I’ve heard positive things about this community!

    So as to contextualise what I’m trying to do, take a look at holesbygrahamallen.org/content

    Ok, so on the home page, you can see that there is a series of text in the main window. This is not a post. Rather, I’ve edited the main template so that it outputs lines of text from a database I have on set up. Obviously I’ve done this using PHP.

    Ok. That’s all fine – this work as intended (I just can’t update my theme at any stage I believe?)

    Right, the problem:

    As you can see, in the top right-hand corner I have customised the search bar, replacing it with my own search form. I want this to search the text, so that, when someone puts in a date, the main page just displays the line of text from that date. I had this working on my own self-build using PHP and Javascript, but I am now unable to get it working on WordPress. Here is the code:

    1. The search form
    2. The PHP (which I had called searchResults.php)
    3. The Javascript which inclues the relevant function (which I had called common.js)

    1. The search form:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    2. The PHP (which I had called searchResults.php):

    [Ditto]

    3. The Javascript which inclues the relevant function (which I had called common.js):

    [And again.]

    Thanks in advance for any support that might be offered…

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Getting a customised search bar to work’ is closed to new replies.