Category Archives: Views

Conditional Fields in View – show if not empty

Fields can be hidden if they are empty as follows:

 HTML |  copy code |? 
1
[wpv-if contact="wpcf-contact" evaluate="empty($contact)" condition="false"]
2
[wpv-post-field name="wpcf-contact"]
3
[/wpv-if]

Posted in Views | Leave a comment

Views Featured Image Size

Specify featured image size using WP Views field:

 HTML |  copy code |? 
1
[wpv-post-featured-image size="full"]

Can define new image sizes in functions.php and use them for specific instances

Posted in Views, Wordpress 3 | Leave a comment

No Posts Found Text Shortcode

Shows text within shortcode tags when no rows are returned by the view

 HTML |  copy code |? 
1
[wpv-no-posts-found]<strong>No posts found</strong>[/wpv-no-posts-found]

Posted in Views | Leave a comment

Views using URL parameters for filters with spaces in the name

When using URL parameters to specify a filter use the Taxonomy name and use %20 in place of spaces.

 HTML |  copy code |? 
1
/12/latest-reviews/?wine=Sauvignon%20Blanc&vintage=2010

Posted in Views | Leave a comment