Search

How Can I Remove the Prefix from Thread Page Title?

  • Thread starter 15Katey
  • Start date
15Katey

15Katey

Member
Joined
May 10, 2021
Messages
130
Reaction Score
0
Points
23
  • #1
I love the prefix feature of XenForo, but I see that it's intrusive to the design in places. I love the fact that visitors and members can click the prefixes on the forum pages to filter their results, but I'd rather not see them on the thread pages at all. At the very least, I'd like to remove them from the thread page titles and move them from the front of the H1 title to the rear. Is this possible? If so, which templates do I need to edit?
 
EmeraldHike

EmeraldHike

Member
Joined
May 10, 2021
Messages
133
Reaction Score
0
Points
21
  • #2
You can absolutely either move or remove the prefix text from thread pages. It's an easy template edit. The template you want to open and edit is the THREAD_VIEW template. Just navigate to Appearance > Templates > thread_view and then make the following edits. These changes are limited to the first two lines of code.

Line 1 controls the actual title of the page that's visible up in the browser tab. So if you'd like to remove the prefix from the title entirely, change:

<xf:title page="{$page}">{{ prefix('thread', $thread, 'escaped') }}{$thread.title}</xf:title>

to

<xf:title page="{$page}">{$thread.title}</xf:title>

Basically, this is the prefix code you're either removing or moving:

{{ prefix('thread', $thread, 'escaped') }}

As you can see, it's in both lines 1 and 2.

For line 2 (the H1 title on the page itself), if you'd like to remove the prefix altogether, just remove the code I just displayed directly above. If you'd like to move the prefix from the front of the text to the rear, change:

<xf:h1>{{ prefix('thread', $thread) }}{$thread.title}</xf:h1>

to

<xf:h1>{$thread.title} {{ prefix('thread', $thread) }}</xf:h1>

When finished, click the Save button and you'll be all done.
 
Top