I'm a bit fuzzy about the best approach to use from a site performance point of view when implementing Views.
I have a View which has 'post author' and a 'post status' filters. Within the Loop, I have 3 conditional statements which state:-
if post is pending, show 'X'
if post is draft, show 'Y'
if post is published, show 'Z'.
My question is this: is this single View the right or best way of displaying the required output or would it be better to create 3 separate Views instead which would remove the need for any conditional statements as the criteria would be set by the View's filters?
Hello. Thank you for contacting the Toolset support.
Well - if you create a separate view for each post status or for post author it will fire N number of query per view. So it depends upon the list you are going to display for each post status or author.
If you are aiming to display a lot of posts per status then I would suggest creating a view for each status as views also cache the results.
So - if you are not aiming to display thousands of entries, I suggest you keep only one view and add conditional statements.