• Resolved earthartist

    (@earthartist)


    Search function works fine from main/index page however searches made from one of the website “pages” return no results.

    I am using the ‘Random Image Theme’ although I have tested this issue using a new, clean theme and the problem still exists.

    Each page (including index) involke <?php get_sidebar(); ?> and sidebar.php calls for the searchform.php so it appears that all pages use the same code

    I wonder if there is some kind or “realative” or “absolute” refference that prevents searchform.php from accessing the the database.

    https://ward4guelph.ca

Viewing 2 replies - 1 through 2 (of 2 total)
  • In different versions the searchform.php could start with this line:
    <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
    or with this one:
    <form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">

    I suspect the they don’t really work in all the server settings… so check out which one is the best for you.

    Thread Starter earthartist

    (@earthartist)

    The second one works GREAT – thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No Search results from “Pages”’ is closed to new replies.