I’m trying to get wordpress posts belonging to a certain category if a condition is met.
So basically there is a select dropdown where the user chooses a category. Once they haven chosen said category I want to display the posts of that category, so something like:

var postID = "Case Study"  // category name

         // get the posts of the category that is equal to Case Study

I know how to do this if it was just one category i.e Case study, however as they have got the choice from several categories I need to somehow match the selected category and post only the posts from that category.

Any ideas?

Read more here: Get wordpress posts from certain category if statement


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: