Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Using wpv-post-count In Conditional Statement In Query Results

$
0
0
Good day,

I have a number of "Locations" added as a Custom Post Type. What I am trying to do is have the Search behave in such a fashion where, when only one result is returned, it redirect to wpv-post-url.

I have tried:

[wpv-if evaluate="[wpv-post-count] = 1"]



[/wpv-if]
[wpv-if evaluate="[wpv-post-count] > 1"]


etc

[/wpv-if]

And

[wpv-if evaluate="'[wpv-post-count]' = '1'" ]



[/wpv-if]


etc

As well as a few other variations. However, so far, it hasn't made any difference – and any time there is more than one result, the page redirect's to the second result's wpv-post-url.

Any and all pointers and assistance would be appreciated.

Thanks


Viewing all articles
Browse latest Browse all 20145

Trending Articles