'cblock', 'post_status' => 'publish', 'p' => $footer_id, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { while ( $query->have_posts() ) : $query->the_post(); the_content(); endwhile; } wp_reset_postdata(); elseif($adrian['custom-footer'] != ""): $footer_idsi = $adrian['custom-footer']; $args = array( 'post_type' => 'cblock', 'post_status' => 'publish', 'p' => $footer_idsi, ); $query = new WP_Query( $args ); if ( $query->have_posts() ) { while ( $query->have_posts() ) : $query->the_post(); the_content(); endwhile; } wp_reset_postdata(); else: ?>