• Resolved heiseheise

    (@heiseheise)


    One year user, first time poster ??

    Anyway, so I’m building my first template and want to include the simple ability for the search engine to return the original query to the searcher, instead of just “Not Found” which is the default.

    So, I have this thus far:


    <div class="post">
    <h2><?php _e('I\'m sorry, the query '$_GET["s"];' could not be found'); ?></h2>
    </div>

    I used “s” as the name because it looks like that’s what it is named in searchform.php – but yet, when I try testing it out, I get a: Parse error: syntax error, unexpected T_VARIABLE

    Can anyone let me know what little thing I’m missing? ?? thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • It should be:

    <?php _e('I\'m sorry, the query '.$_GET["s"].' could not be found'); ?>

    And I don’t think the _e function will work like that, but if your site is in english, then it shouldn’t matter.

    Thread Starter heiseheise

    (@heiseheise)

    Ah concatenation, I figured it was you I was missing. I had already tried putting them outside the single quotes but I guess I forgot inside. ?? Thank you – it worked fine!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘integrating $_GET into search.php’ is closed to new replies.