Schoolboy error!
I was using:
$_GET['s'];
as opposed to:
get_query_var('s');
Hence the empty search results.
Hope this might help somebody in the future!
Related Posts:
- Need help with add_rewrite_rule
- Pretty permalinks for search results with extra query var
- Custom post type permalink endpoint
- permalink independent on the post’s name stored in the database
- How to add a custom URL placeholder to author archives?
- Permalink/Pagination issue: Category base name same as page name
- Make post slug have priority over category slug
- Custom Rewrite with Query vars
- Using two permalinks for one post
- flexible rewrite ‘ramble’ URLs with WordPress
- Change the custom post type permalink
- Custom rewrite rules for feeds of custom queries (query_var query strings in URL)?
- How to change URL structure for pagination pages?
- custom naming of search permalink /search/
- Rewrite url / permalink for default archive – yearly / monthly
- Rewriting search permalink
- Rewriting permalinks with custom posts
- Rewrite rule never matching
- Child pages with same slug
- Permalinks, Rewrites, Get Variables, Oh My!
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Date archive permalink modification
- Change permalink for a single post entry
- Search result permalink
- How to Modify Existing Rewrite Rules?
- How to get wordpress link to fully evaluate when coming from facebook
- custom permalink/shortlink with base62 encoded post ID
- Page Attachment Permalink Structure based on Menu Order?
- When is it a good idea to build a permalink structure from scratch?
- I need a custom permalink for my website
- Changing search URL to something other than “search”
- Permalinks: Page Not Found
- Custom permalink for search and pagination
- How to add_rewrite_rule with two parameters to a single view page?
- Rewrite Rule for default post type
- how to add rewrite rule to wordpress default post type
- Remove custom taxonomy base from URL
- remove sub-category of Custom Post Type from permalink structure
- add_rewrite_rule not working for me
- Is a permastruct possible on pages?
- Rewrite rule for a query string
- How to make /search/ without parameters not return a 404?
- How do I add /blog/ as a prefix to permalink structure for posts, categories & tags?
- Is there a link parameter that will show me all my published pages?
- How to remove specific category from URL in WordPress
- Redirect Uploads Folder to Query Vars in WordPress
- Custom permalink for specific category
- Custom permalink leads to index page
- Rewrite rule intended for CPTs gives 404 for pages
- WordPress add_rewrite_tag working for Posts, but not working for Pages
- Rewrite URLs for LeadPages due to subdirectory installation
- Permalink structure between 2 custom post types and a taxonomy
- Rewriting single post url; add_rewrite_rule problem?
- How to change “attachment_id” in attachment permarlink?
- Custom rewrite rule ignored
- How to test custom rewrite rules /permalinks?
- wordpress how to replace url /bar with foo/bar for custom post type
- Remove some rewrite rules in wordpress
- encoded search terms with %20
- Getting back a permalink from custom url
- Order custom post type posts by custom field with pretty URL
- Adding URL prefix for foreign language support
- add_rewrite_rule on default post type
- Exclude single page from permalink rule
- help to remove last trailing slash using add_rewrite_rule
- add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
- Add custom query vars to pretty permalinks
- Rewrite rule not passing variable
- corrupted URLs – can’t leave starting page
- rewrite based slug standar post wp
- Adding custom query var to a single post without redirecting to its root slug
- remove SLASH on single_post but KEEP on categories and parent pages
- Multiple Taxonomy Items for Separate URLs
- Fire a code when permalinks updated
- .htaccess to redirect to a wp page
- Flush rewrite rules with scheduled event (cron)
- Multiple URL rewrite rules and get every prams
- Using a template file for a specific custom URL
- Replacing + sign to – in wp Search Permalink
- Add slug to default post permalinks ONLY
- Custom permalink question
- Added a prefix in URL permalink structure but the old structure still working!
- Permalinks Question: Adding a prefix ONLY in front of all posts with the ‘video’ post format
- Create new URL structure for custom post types
- How to change the URL using rewrite rule in wordpress
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- create user’s view profile link with username
- Pretty Filter URL
- WordPress Pagination Custom Rewrite Rule for Pages
- rewrites and custom links in page need help with add_rewrite_rule
- Add Custom Pagination Permalink
- Prevent guessing slug
- ReWrite Permalink to New Permalink Nginx
- Permalink broken for pages after adding rewrite rule
- Custom rewrites for pages and categories
- WordPress custom permalinks, pages are now 404
- Search results highlight breaks my read more link
- Add additional URL variations for a Post
- ‘Unsupported Operand Types’ error stemming from taxonomy re-writes with PHP 8.1
- make a new structure tag that does some processing