XF 2.1 How to remove Thread Prefix from Thread Title (SEO purpose)

Peremr

Active member
Is there a way to disable Thread prefix from thread titles?
I've found some similar question related to XF1.5 but I don't know if there is another way to disable them from the Thread title metatag.

Many thanks in advance.
 
In the thread_view template, edit the first two lines and remove the {{ prefix(...) }} code from the tags where necessary.

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

After:
XML:
<xf:title page="{$page}">{$thread.title}</xf:title>
<xf:h1>{$thread.title}</xf:h1>
 
In the thread_view template, edit the first two lines and remove the {{ prefix(...) }} code from the tags where necessary.

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

After:
XML:
<xf:title page="{$page}">{$thread.title}</xf:title>
<xf:h1>{$thread.title}</xf:h1>
Thanks man.
 
Is there also a way to do this true extra less and leave the thread view template standard?
Yep, you can add this to your extra.less template
Less:
[data-template="thread-view"] {
    .label, .label-append {
        display: none;
    }
}

But the Bots read the HTML file and not the HTML+CSS rendering if I'm not mistaken so by going through the CSS/Less method the prefixes will be indexed with the titles of the discussions.
 
Top Bottom