WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hope this is easy!

Need to figure out (if possible) how to input my page's SLUG into a web url as a placeholder.

For example: http://www.samplewebsite.com/search.ashx?t=current

I need to replace "current" with my page's SLUG making it dependent on the current page's SLUG

For Slugs.... test1, test2, test3, test4, test5 Output... http://www.samplewebsite.com/search.ashx?t=test1 - for each test1 "slug"

Is this possible?

share|improve this question

Umm .. are you sure you are using WordPress :)

A standard search url for Wordpress uses the URL parameter ?s or /search/

so you can have any URL's you like such as example.com/?s=current or example.com/search/current

Others you can try are /tag/current search for all posts with the Tags current

/category/current will search for all posts with the Category current

Does that help?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.