How to know if user choose to show full post or excerpt?

I’ve seen there is a setting to choose whether to see full posts or excerpts on feed. However I’m using a theme that doesn’t seem to support this functionality (it always show the full post). For this reason I created a child theme and would like to know what function to use to check what the user chose from preferences. e.g:

<?php if ( did_the_user_choose_excerpts() ) : ?>
<div class="entry-summary">
    <?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
    // Full post

How do I check if the user chose to see excerpts?

Related posts

Leave a Reply

1 comment

  1. Show summary or full textx for feeds

    That option refers to show excerpt on rss/atom feeds, not to normal frontend archives.

    You can get that value using

    get_option( 'rss_use_excerpt' );
    

    That is 1 if user choose “Summary”, 0 if user choose “Full text”.