I am trying to show a list of terms from my Job Category. I tried the following:
function job_listing_taxonomy_list( $taxonomy,$hide ) {
$args = array('order'=>'ASC','hide_empty'=>$hide);
$terms = get_terms( $taxonomy, $args );
if ( $terms ) {
printf( '<ul name="%s">', esc_attr( $taxonomy ) );
foreach ( $terms as $term ) {
printf( '<li><a href="http://example.com/?s=&'.$taxonomy.'=%s">%s</a></li>', esc_attr( $term->slug ), esc_html( $term->name ) );
}
print( '</ul>' );
}
}
However, when I click the link of one of the terms that are generated, for example:
http://example.com/?s=&job_listing_category=finance
it is changed to:
http://example.com/?s?job_listing_category=finance
Why is the =& changing to a '?' ? I've spent a good half an hour combing Google and this site for answers, but I'm not entirely sure what to even look for! On a side note, I did have a Custom Post Type Permalink Rewrite plugin installed earlier which caused a Strict Standards error, but after disabling it (turns out I wasn't using it anyway), I now get this error....
Any suggestions?
Edit: I've tried replacing the & with &, but it didn't make a difference
s
argument? I am guessing that your theme or a plugin is producing this behavior, as a core bundled theme with no plugins does not produce the result you describe.$output.=
variable for each tag. I am currently building this on the WP Job Manager plugins
argument is doing nothing here, so I'm not sure why you have it there.