Posts: 876
Name: Matt Pealing
Location: England, north west
|
I have links on a page on my Wordpress website that look something like this:
Code:
directory/?category=Audio+%26+Video
I'm using +%26+ because I need the search to look for a ' & ' (i.e. an ampersand with a space on either side of it).
Obviously I can't use '&' or '&' because then the PHP code I'm using will expect a value after it.
But if I click a link such as
Code:
directory/?category=Audio+%26+Video
Then no results are displayed, even though there should be! There are many records in my database that have this value.
As a quick test, I performed a search through Wordpress' search box and only entered '&' into the text field.
After clicking search I noticed that it appeared as '%26' in the address bar, so that must be the way to search for an ampersand character... but it just doesn't bring up any results when clicking the hardcoded links!
Does anybody know what the problem might be? I hope the only solution isn't for me to go through countless Wordpress custom fields and replace every '&' symbol for the word 'and' 
|