Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 12027

A permanent link to an item (a blog post, an attachment, ...). The default structure is "?p=123", but WordPress can handle "pretty permalinks" and will rewrite them internally to the former version. If you have a question about special rewrite structures you should use the [url-rewriting] tag.

1 vote
1 answer
616 views

Pretty Permalink for Search Queries Not Working

As the title suggests I am trying to create pretty permalinks for search queries, but unfortunately I cant get them to work. … $wp_rewrite->preg_index(1) ); $wp_rewrite->rules = $feed_rules + $wp_rewrite->rules; } // refresh/flush permalinks in the dashboard if this is changed in any way add_filter( 'generate_rewrite_rules …
noelmcg's user avatar
  • 199
1 vote
Accepted

Pretty Permalink for Search Queries Not Working

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!
noelmcg's user avatar
  • 199