Support

Account

Home Forums ACF PRO Flexible Content on options page not saving/displaying. Reply To: Flexible Content on options page not saving/displaying.

  • Thanks for the image get_sub_field change!

    I looked through everything else and it seems in order. It’s really bugging me as I’ve focused a few mornings on just this.

    Edit: Further making this more strange is that I just clicked a post and a page and the slider shows but on the homepage and archive page it doesn’t!

    Edit 2: I thought back about this after the first edit and I found the problem. I had code in the functions.php of my theme that was conflicting with ACF.

    Here is the code in question that I removed and then everything started working fine.

    
         // Adding custom post types to homepage
        add_filter( 'pre_get_posts', 'my_get_posts' );
            function my_get_posts( $query ) {
                if ( is_home() && false == $query->query_vars['suppress_filters'] )
                $query->set( 'post_type', array( 'post', 'quote', 'attachment', 'status', 'audio', 'chat', 'video' ) );
                return $query;
            }
    
         //CPT on Archives
        function add_custom_types_to_archives( $query ) {
            if (! is_post_type_archive() ) {
                if( is_archive() && empty( $query->query_vars['suppress_filters'] ) ) {
    
                    /*// Get all your post types
                    $post_types = get_post_types();*/
                    
                    $post_types = array('post','movie');
    
                    $query->set( 'post_type', $post_types );
                    return $query;
                }
            }
        }
        add_filter( 'pre_get_posts', 'add_custom_types_to_archives' );