Manual excerpt being ignored on custom post type


I’ve set up some custom post types with Pods, but can’t seem to get it to display my manual excerpt. It’s working fine for my normal posts.

I’ve tried displaying it with echo get_the_excerpt() and the_excerpt(). I’ve tried doing it using get_posts() and setup_postdata(). I’ve also tried a standard WP_Query loop.

No matter what I do, it just gives me the automatically generated excerpt.

Any ideas?

        $posts = get_posts(array(
            'post_type' => 'press-release'
        foreach ($posts as $i => $post) { 
            setup_postdata($post); ?>
            <div class="row press appear" on-visible="{class: 'visible'}">
                <div class="columns small-3">
                    <p class="date"><?php echo get_the_date('M j Y'); ?></p>
                <div class="columns small-9">
                    <h2><a target="_blank" href="<?php echo get_the_permalink(); ?>"><?php the_title(); ?> &nbsp; ></a></h2>
                    <div class="excerpt"><?php the_excerpt(); ?></div>
        } ?>
, Joren 4 years 2020-02-28T08:38:22-05:00 0 Answers 66 views 0

Leave an answer