Support

Account

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
    }