Problem with excerpt on Custom Post Types
-
Hi there,
I’m trying for quite some time to make a excerpt, the thing is that not only get the summary out, but it all goes.
Attachment part of my code, so you can see where I got the error.
$leidoPages = get_posts(array('orderby' => 'post_date', 'order' => '100', 'post_type' => 'leido', 'posts_per_page' => 3)); <section onclick="window.location = '<?= get_permalink($leidoPage->ID); ?>' id="leidosBanners" class="cf"> <?php $counter = 0; foreach ($leidoPages as $leidoPage): ?> <?php if($counter == 0 || $counter == 1): ?> <div class="columns sixteen leidosBanner"> <?php $leidoImage = get_leido_image($leidoPage->ID, array(940, 320)); ?> <a href="<?= get_permalink($leidoPage->ID); ?>"> <?= $leidoImage['image']; ?> <div class="textoleido"> <?= apply_filters('the_content', $leidoPage->post_content); ?> </div> </a> <?php elseif ($counter > 1 && $counter < 4): ?> <div class="columns sixteen leidosBanner"> <?php $leidoImage = get_leido_image($leidoPage->ID, array(460, 170)); ?> <a href="<?= get_permalink($leidoPage->ID); ?>"> <?= $leidoImage['image']; ?> <div class="textoleido"> <?= apply_filters('the_content', $leidoPage->post_content); ?> </div> </a> <?php endif; ?> </div> <?php $counter++; endforeach;?> </section>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Problem with excerpt on Custom Post Types’ is closed to new replies.