[Resolved] True condition that fails
I love your plug-in, but here’s some code that should evaluate to true for a particular post (I echoed it out on the page) and yet the widget fails to appear:
$terms = get_the_term_list( $post->ID , 'Placement'); strpos($terms,"art-home") && strpos($terms,"writing-home") && strpos($terms,"design-home")
Basically, I want to widget to appear if and only if all three of the strings appear in the term list. The code evaluates to three positive integers, yet doesn’t evaluate to true. I also tried explicitly stating “> 0” which is also true. What’s going on?
- The topic ‘[Resolved] True condition that fails’ is closed to new replies.