I have the same issue as the question posted here :

Is there a way to stop WP editor deleting <gcse:searchbox-only></gcse:searchbox-only>

I have created a custom-function.php file where I put the shortcode required. It works for the search box.

However, I would now like to do the same for the searchresults code gcse:searchresults-only</gcse:searchresults-only>. I tried editing the shortcode above but that doesn't work.

What I want is have the search results appear in the same page as the search box, not in a separate one which the current shortcode does.

Any suggestions to make this work?

  • 1
    Create different shortcode for different tag you need? Exactly same principle applies.
    – Rarst
    May 17 '14 at 17:27
  • How did you edit the shortcode? Post your code. For the record (and maybe this is confusing you) my shortcode, from the question you reference, doesn't do anything but echo a single line of markup. It does not provide an actual search box not does it process the search. Some other code, almost certainly Javascript, does that.
    – s_ha_dum
    May 17 '14 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.