Pinned topic summary is using first-line link text instead of body text

Hey folks!

When you pin a post, a summary is displayed under it when on the Latest section. Unfortunately, the first line of my post displays the link and then the text of the post. This distorts the reading of the summary for the reader.

In case it matters, I’m using official Discourse integration from Wordpress to push the post into the forum. Yes, default <small> behavior for the link intro.

So the summary reads:

Read the article: <link>

Text here

I tried ask.discourse and it mentions a plugin I don’t use. This is all I have an their status.

Theme Component Name Enabled
discourse-category-banners Yes
discourse-christmas-decorations No
discourse-social-share Yes
Easy Footer Yes
Reftagger Yes
Topic Thumbnails No
Twitter Native Embed Yes

Does this happen in safe mode? Does the link go to the WP post or the Discourse topic?

Thanks.

It does still happen in safe mode.

Also, the line is not the link itself, but the text of the link, the link preview.

I’m sorry, but could you elaborate on this? Does the link above the preview go to the WP site’s post or the Discourse forum topic? Thanks.

I think an example will make this clearer.

This is what I’m seeing on /latest:

This is a pinned topic on the forum’s /latest page.

Notice that the preview begins with:

“Full article at: Lorem Ipsum Dolor Sit Amet Consectetur Adipiscing Elit?”

…and then continues with the body preview:

Nulla facilisi lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incidid… read more

If you click into the topic itself, everything is fine. The topic renders correctly.

At the top of the topic, the structure is:

<small>Full article at: Lorem Ipsum Dolor Sit Amet Consectetur Adipiscing Elit?</small>
<p>Nulla facilisi lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incidid...</p>

So the first line is a small, contextual link back to the full article, and the actual topic content begins immediately after.

The problem is only on /latest: Discourse appears to be using the first-line link text (“Full article at: …”) as part of the topic summary when the topic is pinned, instead of skipping it and using the body text.

This makes the /latest view feel very clunky, since the link text dominates the preview and pushes the actual topic summary down.

My expectation would be that:

  • a first-line contextual link (especially inside <small>) would be ignored for summary purposes, or
  • pinned topics would derive their preview from body text rather than link text.

Is this expected behavior, or is there a setting / theme-level override that controls how pinned topic summaries are generated on /latest?

I can’t seem to repro this on another instance. When I pin the topic globally, I immediately see the 1st line of the post content. Even with Embed Discourse comments on another website via Javascript, I don’t see that small text.

Hey Nate — appreciate you taking the time to respond.

I think we may be missing each other slightly, so I want to clarify.

I’m not embedding or oneboxing anything. This is a regular Discourse topic on the Discourse forum.

Inside the topic itself, the structure is:

  • First line: a small contextual link back to a WordPress article
  • Then: the actual body text of the Discourse post

So within the topic, everything renders exactly as expected.

The issue only appears on the /latest page, and specifically with pinned topics.

On /latest, Discourse is pulling the first-line link text (“Full article at: …”) into the topic summary instead of skipping it and using the body text that follows. As a result, the /latest preview shows the linked article title first, and only then the actual topic content — which feels very unintuitive and clunky.

To be clear:

  • this is not about embedded topics
  • not about oneboxes
  • not about WordPress rendering
  • everything involved here is happening entirely inside Discourse

My expectation would be that first-line contextual links (especially ones intended as metadata) would be ignored for excerpt generation on /latest, with the summary derived from the topic body instead.

So the core question is:

Is this expected behavior for pinned topics on /latest, or is there a setting / override that controls how the excerpt source is chosen?

Ah! That clarifies things. I don’t believe there is any way to change the topic excerpt via a setting. However, you can try this to specify the topic excerpt in the topic list:

I tested it and it works quite well.

3 Likes

Winner winner chicken dinner!

Thanks Nate, that did the trick!

1 Like