Home › Forums › General Issues › Show on start page – True or False › Reply To: Show on start page – True or False
There are multiple ways to do this. You could either create a custom taxonomy called something like “show_on_home” and then, just like a category, you would choose an option when publishing the post and the just add ‘show_on_home’ => ‘true’ to your query.
Or, if you really want to use ACF to do this, you could just use a conditional statement to hide some of them. Something like this:
if (get_field('show_on_home')) {
Put your loop here...
}
That is sort of inefficient though because your still loading the posts with the loop, and then just hiding them.
The better way to do it, although a bit more complex, is using meta_queries in your main query. I would start here to learn about those: http://codex.wordpress.org/Class_Reference/WP_Meta_Query
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.