Home › Forums › ACF PRO › Delete WP Title and use ACF Title › Reply To: Delete WP Title and use ACF Title
You can do it in one function, you just have to check for each post type. Rather than returning
if ($post_type == 'car') {
// do the car post type
}
if ($post_type == 'house') {
// do the house post type
}
If you used the same field name for the acf field on both of these post types then you could do something like
if ($post_type == 'car' || $post_type == 'house') {
// do the house and car stuff
}
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.