custom theme’s search not working

See the Codex page for Template Heirarchy – https://codex.wordpress.org/Template_Hierarchy#Search_Result_display

Based on the links you provided, I’d guess the error stems from using a “static” index page. If your index.php file doesn’t contain a loop to iterate through posts, it won’t display any search results.

You can retain a “static” index if you create a search.php page with a simple loop:

if (have_posts()) :
    echo '<ul>';
    while (have_posts) :
        the_post();
        echo '<li><a href="' . the_permalink() . '">" . the_title() . "</a></li>;
    endwhile
    echo '</ul>';
else :
    echo 'No Results Found';
endif

Note that this is a very simple loop to display an unordered list of post titles as a links. You could make it more complex if you choose to do so.


To follow up my original awnser:

Based on comments made by ehmad11 (and a test of my own to confirm), it looks like this is probably an issue with the else block of your loop.

The test search you provided returns no results because there are no results to return. Additional attempts using terms that are known to appear on the site (e.g. ‘test’ or ‘page’) return results as expected.

You need to manually include a message to print when the search returns no results.

Check to be sure you have the following:

if (have_posts()) : // Returns false when search finds no results
    // Build The loop
else :
    echo "No results found message";