With the Views plugin you can create different Views elements to display all your custom types and content on the front-end, without coding. You can also create powerful parametric searches and add pagination to your content lists.
When you ask for help or report issues, make sure to tell us the options of your View.
Viewing 15 topics - 5,386 through 5,400 (of 5,403 total)
Problem: I have CPT A and CPT B. CPT B is a child of CPT A. On the single post page for CPT B, I would like to use a conditional that tests whether the post has a parent from CPT A. If it does, I would like to display the parent's post title. If not, I do not want to display anything.
Solution:
You can exploit a quirk of Types to compare the current post's ID with the parent post's ID. If they are different, you know you have a parent post. If they are identical, you know that the post has no parent.
[wpv-post-title] [wpv-conditional if="( '[wpv-post-id id='$city']' ne '[wpv-post-id]' )"]| [wpv-post-title id="$city"][/wpv-conditional]
Problem: I am trying to show 3 Views in different Beaver Builder tabs, but only one of them seems to show the correct results.
Solution: Make sure "Don't include the current page in query result" checkbox is unchecked in each View. This setting can cause unexpected problems in Views results if used when it is not necessary.
Problem:
A View outputs posts ordered by the options of a radio custom field. The options are in alphabetical order, but the client would like the options to be treated in a custom order that he specifies.
Solution:
This requires custom code which uses the wpv_filter_query_post_process filter to modify the order of posts after they have been retrieved from the database.
Problem: I would like to filter a View based on a date custom field. Only results between today and 90 days from now should appear.
Solution: Do not use conditional HTML inside the results of a View if you intend to use pagination. Instead, the preferred method is to apply a Query Filter. The settings for the date range filter you described are "UNSIGNED", "between", "TODAY", and "FUTURE_DAY 90"
Problem: I have a custom search View that uses a distance filter and a taxonomy filter, but the taxonomy filter does not seem to work correctly.
Solution: Check your View's Query Filter configurations. In this case the url_param was set incorrectly and should be changed to "wpvexpertcategory" as shown here:
Problem: I would like to set up a "Bookmark" button so that Users can bookmark posts for reference later. Then I would like to set up a View to show each User their bookmarked posts.
Solution: There is not currently a built-in way to associate Users and Posts, so you would have to create something like this with CRED. You could create a repeating field on the post that stores User IDs, and use CRED to add or remove the current User's ID from this repeating field group on each post.