Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.