The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress add ampersand to string just outputs %26 instead of &

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #32915


    I have been trying to adding a more advanced search to my site, basically i want to search by category AND/OR by taxonomy, i found this tutorial:

    That kind of works great, but it outputs the wrong string to the URL, it outputs “?cat=0&taxonomy=dalarna&s=” istället för “?cat=0&taxonomy=location&term=dalarna&s=” which is quite annoying because this is exacly what i am searching for and it fails just on the last inches to the finish line..

    So if you look at this line: $term_slug = $term_slugs[$term]; <--- that is where the string outputs to the URL, the problem is, i am trying to add the bit in the middle that is missing from the string, by doing this:

    $term_slug = 'location&term=' $term_slugs[$term];

    That SHOULD be enough, that should be the finish line, except for the fact that it writes %26 in the URL instead of the ampersand, why is that? I am soooooo close, would really appreciate a little help.

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.