Forums
Home / Fixing WordPress / Full singel post
(@bertil-rosenius)
2 years, 11 months ago
Is it possible to display a specific (single) post as full post, instead of excerpt by using:
.post-xxxx xxxx{ xxxx: xxxx; }
i css.
(@yogeshyadav20)
Yes, you can do something like this
<?php $loop = new WP_Query(array ('post_type' => 'carousel', 'orderby' => 'post_id', 'order' => 'ASC')); ?> <?php while( $loop->have_posts() ): $loop->the_post(); $current_id = get_the_ID(); ?> <div class="bbbb"> <div class="aaaa"> <h3><?php the_title(); ?></h3> <?php if($current_id == 12){ the_content(); }else{ the_excerpt(); } ?> </div> </div> <?php endwhile; wp_reset_query();?> </div>
2nd way
echo both content and expect in separate div and call post id in each div, hide add content div except what you want to show