Views plugin lets you build your own custom search for any content type. These searches can be based on post content, taxonomies and custom fields.
When you ask for help or report issues, make sure to tell us settings for your custom search.
Viewing 15 topics - 3,271 through 3,285 (of 3,481 total)
Problem:
So now I have:
Director CPT as parent of Movie CPT
Cast CPT as parent of Actor CPT and Movie CPT
Production Group as parent of Producer CPT and Movie CPT
Is it possible to search for a Child (Movie) by associated relationships (Actors) of it's parent CPT (Cast)? And if so, how so?
If not, then do you think it's possible to implement some naming methodology for the intermediary CPT that includes the actors that would allow for this? Solution:
A1) Cast CPT as parent of Actor CPT and Movie CPT
To setup many-to-many relationships between post types "Actor" and "Movie", you will need to setup "Cast" as child post type of "Actor" and "Movie".
See our document:
Creating and Displaying Many-to-Many Post Relationships https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
Same as above, I suggest you setup Many-to-Many relationships between below post types:
Movies and Directors
Movies and Producers
A2) Is it possible to search for a Child (Movie) by associated relationships (Actors) of it's parent CPT (Cast)? And if so, how so?
Yes, it is possible to search for a Child (Movie) by associated relationships (Actors), see above document:
Displaying Many-to-Many Relationships Using Views https://toolset.com/documentation/user-guides/many-to-many-post-relationship/#4 Relevant Documentation:
Problem:
In the nested views, the child view does not display any post.
Solution:
Please check the child view, make sure it is using the post relationship filter:
Select posts that are a children of the current post in the loop
Problem:
How can I display certain content if an Image Field is empty?
Solution:
You can use Conditional HTML.
As example the below code checks if a Field (image) hold no image, and if this is true, it displays whatever custom contnet.
[wpv-conditional if="( $(wpcf-image) ne '' )"]TEST CONTENT[/wpv-conditional]
Problem:
How can I hide the options (terms of a taxonomy) in a parametric Search Filter, if no posts are assigned to them?
Solution:
When you insert your Taxonomy Filter with the "Add Filter" Button (or edit it with the "Edit Filter" Button), you will (for taxonomies) see an Option
Terms without any post:
There you will choose
Exclude - only list terms which are assigned to posts