Support

Account

Home Forums General Issues How do I get PHP function to affect what’s displayed on my page? Reply To: How do I get PHP function to affect what’s displayed on my page?

  • ACF does not work directly with page builders.

    For elementor you either need to get the pro version that has ACF integration for most fields, use the ACF shortcode for simple fields or build your own shortcode for complex fields.

    Something like a pre_get_posts query should work as usual placed in your functions.php file.

    This part of your code looks to be incorrect

    
    $query->query_vars['post_type'] == 'Staff Member'
    

    You need to post type name there, not the label.