go41

get_search_query() urldecode wordpress

von Joern am 2. Mrz. 2011 | Keine Kommentare

Upgrading WordPress from 3.0.5 to 3.1 I realized that the function

Code:

<?php the_search_query(); ?>

and also get_search_query() is giving different results on WordPress 3.1
while a search for:
go41.de/?s=wordpress+custom+query
will display as ‚wordpress custom query‚ using the_search_query()
a search with the url /search/ like this:
go41.de/search/wordpress custom query/
will display as ‚wordpress%20custom%20query‚ with the urlencoded space ‚%20‘
To show this on screen correctly I have to use

urldecode (get_search_query();
I might be the only one getting the search query $s in this way, but anyway it’s strange..
Anyone an idea what to do instead?

(von: f-t-cat)

Sorry, no posts matched your criteria.

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: