WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#39519 closed defect (bug) (worksforme)

Twenty Seventeen: Excerpt not showing

Reported by: Sheriziya Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: has-screenshots
Focuses: Cc:

Description

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed. I've checked the theme files and there is a content-excerpt as well as an excerpt function. Somehow it's not called, though. I've got two sites where you can see it not showing (I've got the settings set to summary on both sites):
Never Ending Realms Dev Blog: http://neverendingrealms.com/blog/
Ilse Mul: http://ilsemul.com/blog/

Several other wordpress users have mentioned this problem in the support threads, unfortunately without a good answer. The only solution that came was to create a child theme. I can't imagine we'd have to resort to this if the excerpt is already in the default theme files, hence this ticket.

Attachments (2)

Happy Test Post Search Results.png (43.9 KB) - added by lukecavanagh 5 years ago.
Search results
Happy Test Post Search Results Excerpt.png (34.0 KB) - added by lukecavanagh 5 years ago.
Excerpt showing in search results

Download all attachments as: .zip

Change History (19)

#1 @Presskopp
5 years ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Excerpt in 2017 not showing (Theme bundled with Wordpress Core) to Twenty Seventeen: Excerpt not showing

#2 in reply to: ↑ description ; follow-ups: @SergeyBiryukov
5 years ago

Hi @Sheriziya, thanks for the ticket!

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed.

The option in Reading Settings only applies to RSS feeds and does not affect the front-end appearance (which is completely controlled by the theme), see #22049.

FWIW, previous bundled themes didn't have an option to switch between full text and excerpt either.

#3 @Sheriziya
5 years ago

You're welcome :)

Do I understand it correctly than, that the content-excerpt (comment in that template says: Template part for displaying posts with excerpts) is only for the feeds and NOT for the blog page? Shouldn't the template say that it is for feeds, instead of a blog page?

Just trying to understand the theme here better :) Especially since several more users seem to think the same thing as I, the blog page should display the excerpts.
Additionally, I checked the archive page and the category page, but the excerpt doesn't show there either.
The Search results gives both the manual summary I've set (without a "Continue reading link") AND the summary made up of the first 55 words..... (with a wrong "Continue reading link" -> leads to the main page, instead of the post). Why display both summaries? There's no logic in that.

The feed does indeed give the summary as it's supposed to do. I just checked that.

I could have sworn I'd had a bundled theme with summaries, but perhaps that was on wordpress.com (where I've got a few old blogs).

I hope this confusing problem can be solved, cause at the moment it's pretty confusing.

Thank you!

#4 in reply to: ↑ 2 @evadillner
5 years ago

Replying to SergeyBiryukov:

Hi @Sheriziya, thanks for the ticket!

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed.

The option in Reading Settings only applies to RSS feeds and does not affect the front-end appearance (which is completely controlled by the theme), see #22049.

FWIW, previous bundled themes didn't have an option to switch between full text and excerpt either.

But would it be that big a thing to add it? If I do a search the results return summaries with read more tags, so the code is already in the theme. I'm fairly technical but it seems a lot of work for each one of us to create a child theme and files when the basic template could add a couple of lines of code and fix the confusion.

#5 in reply to: ↑ 2 @Sheriziya
5 years ago

  • Keywords has-screenshots added

Hi SergeyBiryukov:

Hi @Sheriziya, thanks for the ticket!

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed.

The option in Reading Settings only applies to RSS feeds and does not affect the front-end appearance (which is completely controlled by the theme), see #22049.

FWIW, previous bundled themes didn't have an option to switch between full text and excerpt either.

I just noticed something very weird. I've two websites, both default wordpress 4.7 installations with the default theme (2017) installed without any changes to the core files of the themes. However, in the search results, [one site: http://ilsemul.com/?s=happy] gives only the summary of the article on the page, suggesting the excerpt does work, but for some reason only on the search results (mind, still not on the blog page, archive page nor the category page!).

Search results with only summary (mind, the site is set to one-column, but apparently the search results has a problem with that, just like the blog page I reported in another ticket):
http://ilsemul.com/contentman/wp-content/uploads/2017/01/ilsemul-searchresults.png
Text of the post:

I wish everyone a very happy 2017 with lots of love, and happiness. May all your wishes come true. May you all have a healthy and creative 2017 with wonderful stories to read and tell! Make 2017 YOUR year!

I just noticed what I thought was jumbled, was actually the text of the home page showing up as well in the search results. Hadn't thought about that.
Still..... Excerpt shows on search page, but not on any other page. So... it can be done.

ETA: I just looked at the source files again and noticed this in the content_excerpt template:

Template part for displaying posts with excerpts
Used in Search Results and for Recent Posts in Front Page panels.

Tested especially the last part and indeed, when you display your recent posts on your front page, the summary shows up. I've made the blog page a section of the front page while the site is set to using a static front page and a separate blog page. The separate blog page still shows the full posts instead of the summary. You can see it at [my author site: http://ilsemul.com/]

So the blog page can show the summaries, but only if it's (a section of) the front page??? Confusing and not logical if you ask me.

@evadillner and @lukecavanagh do you see a similar result?

#6 follow-up: @lukecavanagh
5 years ago

@Sheriziya

Just created the same test post on a test site and then checked search for happy. The full text of the post showed on home as well as in the search results.

@lukecavanagh
5 years ago

Search results

#7 in reply to: ↑ 6 @Sheriziya
5 years ago

Hey lukecavanagh:

@Sheriziya

Just created the same test post on a test site and then checked search for happy. The full text of the post showed on home as well as in the search results.

Thanks for testing!

Did you set a manual excerpt as well?

#8 @lukecavanagh
5 years ago

@Sheriziya

So when a set an excerpt in the metabox for that post, when I checked the search the excerpt did show and not the full text.

@lukecavanagh
5 years ago

Excerpt showing in search results

#9 @Sheriziya
5 years ago

@lukecavanagh Does the excerpt also show up on the blog page? It does show up for me on the search result, but not on the blog page, archive page nor the category page.

It only shows up on the blog page, when I select the blog page as a section of the front page, weirdly enough.

#10 follow-up: @davidakennedy
5 years ago

Hey @Sheriziya! Thanks for the report!

So, as far as I can tell from this ticket – no bugs exist. Everything you've pointed out works as it should, so long as I'm understanding everything correctly. I'll clarify a few things:

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed.

This is true. As others have mentioned, that setting only effects RSS feeds, not the site itself.

... gives only the summary of the article on the page, suggesting the excerpt does work, but for some reason only on the search results (mind, still not on the blog page, archive page nor the category page!).

In Twenty Seventeen, the except shows in two places – on search results pages and on blog posts shown in the front page sections. This was mostly a design decision. To use it elsewhere, a child theme is needed.

If a post is less than 55 words, the entire post shows. If it's more than 55 words, an automatic except is shown. If a manual excerpt is created in the WP Admin, that's shown instead. All this is default WordPress functionality.

Does that help? Is there anything I missed? If not, I'll close this ticket. I don't see the theme needing another option allowing users to control the excerpt or full content of posts.

#11 follow-up: @davidakennedy
5 years ago

  • Keywords reporter-feedback added

#12 in reply to: ↑ 10 @Sheriziya
5 years ago

Replying to davidakennedy:

Hey @Sheriziya! Thanks for the report!

You're welcome

So, as far as I can tell from this ticket – no bugs exist. Everything you've pointed out works as it should, so long as I'm understanding everything correctly. I'll clarify a few things:

The bundled theme 2017 doesn't show the excerpts despite setting the reading settings to show a summary on the feed.

This is true. As others have mentioned, that setting only effects RSS feeds, not the site itself.

... gives only the summary of the article on the page, suggesting the excerpt does work, but for some reason only on the search results (mind, still not on the blog page, archive page nor the category page!).

In Twenty Seventeen, the except shows in two places – on search results pages and on blog posts shown in the front page sections. This was mostly a design decision. To use it elsewhere, a child theme is needed.

Personally I don't understand the decision not to show the excerpts when the blog page is not a section of the static front page, but at least it's clear now it's apparently working as it's intended.

So, I should make a child theme only to have the excerpts show up on a blog page that's not a section on the front page. And this while the excerpt is already coded in the theme. Again, a weird decision. Like @evadillner already said above:

But would it be that big a thing to add it? If I do a search the results return summaries with read more tags, so the code is already in the theme. I'm fairly technical but it seems a lot of work for each one of us to create a child theme and files when the basic template could add a couple of lines of code and fix the confusion.

Does that help? Is there anything I missed? If not, I'll close this ticket. I don't see the theme needing another option allowing users to control the excerpt or full content of posts.

I guess @evadillner (and I'll add that as my remaining as well) question still stands: is it that big of a thing to make a (at least to us a seemingly) small change to something that's already coded in the theme, instead of forcing us to make a child-theme, figure out how on earth to manage this with a blog page that's not a section on static frontpage (I guess we'll have to figure out where the filtering is done (since when the blogpage is made a section of the static front page, the excerpts will show up) and how we should adjust this or something). TBH, I have no idea where to even start looking.

#13 @Sheriziya
5 years ago

  • Keywords reporter-feedback removed

#14 in reply to: ↑ 11 @evadillner
5 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

Replying to davidakennedy:
Understood. There will be no changes in the theme to show summary posts.
I'd already figured that out and moved on to Pinnacle by Kadence.

#15 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted

#16 @cavalierlife
5 years ago

This is one of those kinds of decisions that baffles me. In any case, the code located at http://www.blogmynotes.com/display-post-excerpt-twenty-seventeen-wordpress-theme/ works well, though make sure you upload template-parts/post/content.php to your child theme (including the folder, subfolder, and file) - don't overwrite the parent theme as that post suggests to do. Just in case that post gets deleted, here are the instructions.

Duplicate the content.php file in template-parts/post/ and then replace the entry-content div with the following.

<div class="entry-content">
		<?php
			/* translators: %s: Name of current post */
			if ( is_single() ) :
			the_content( sprintf(
				__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
				get_the_title()
			) );

			wp_link_pages( array(
				'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
				'after'       => '</div>',
				'link_before' => '<span class="page-number">',
				'link_after'  => '</span>',
			) );
			else:

			the_excerpt( sprintf(
				__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
				get_the_title()
			) );

			wp_link_pages( array(
				'before'      => '<div class="page-links">' . __( 'Pages:', 'twentyseventeen' ),
				'after'       => '</div>',
				'link_before' => '<span class="page-number">',
				'link_after'  => '</span>',
			) );
			endif;


		?>
	</div><!-- .entry-content -->

#17 @dethfire
3 years ago

Yeah this is old and 2017 theme is old, but it still stunning the designers don't think a summary view is necessary. This isn't 2005. I bet 95% of bloggers prefer summaries for so many reasons. Really really poor design decision. Lazy lazy lazy.

Note: See TracTickets for help on using tickets.