Running a long conditional on the wordpress loop to display certain posts
I'll try and keep this simple.
I need to write a conditional that allows the user to either have 3 posts from one CPT or 1 from each CPT displaying on the homepage.
I have 3 CPT's and 1 taxonomy in each one. Each taxonomy has 3 terms -> homeone, hometwo, homethree
these will be what the user selects to make that post appear on the homepage.
display post in the first loop | homeone = first loop
display post in the second loop | hometwo = second loop
display post in the third loop | homethree = thirdloop
So far to achieve wanted result I've written this but am yet to debug or test it as my knowledge of php is still lacking.
http://pastebin.com/R9g38eRq
The website I'm working on the 3 images with text underneath are what I'm going to be changing
http://goo.gl/lLGI3
Solutions
I would suggest using WP_Query to fine tune the query http://codex.wordpress.org/Class_Reference/WP_Query rather than using if statements and outputting the default wordpress loop .