XF 2.2 Remove prefix from before the site title for SEO reasons

MichaelR

Member
So for SEO reasons i removed the prefixes from before the title if you look at the page title. So this is shown on the explorer tab itself and it works. Before that started with a prefix and now it starts with the thread title. Much better for SEO in my project.

So example is:
chrome_0r5WMmgd2w.png
chrome_ynOZw5e9sw.png
As you see on the explorer tab, it starts with the prefix (followed by the thread title). Crawlers will also see this and ad this prefix to your page title too. I did not want this because prefixes can change at my project.

I changed this by adjusting the thread.view template. (red = old, green = changed and what i use)
chrome_lWNy7KVUnz.png

As i'm learning more and more i have a question about this.
What i am wondering is, if there is a better way of doing this. Perhaps so that i don't have to change the thread.view template.
A bit like using the extra less template. There you don't have to touch core elements of the site but you can adjust the layout.
Anyone know?
 
Solution
No, it can't be done with the extra.less template.

There's nothing to be concerned about - the system has been designed to allow the templates to be edited - the merge function makes it easy to incorporate changes on upgrades.

If you don't want to edit the templates directly then create a small add-on incorporating the edits into template modifications.

Personally though I wouldn't bother - it's just not worth the effort.

I have edited templates on my own site.

1602949122443.png

Brogan

XenForo moderator
Staff member
No, it can't be done with the extra.less template.

There's nothing to be concerned about - the system has been designed to allow the templates to be edited - the merge function makes it easy to incorporate changes on upgrades.

If you don't want to edit the templates directly then create a small add-on incorporating the edits into template modifications.

Personally though I wouldn't bother - it's just not worth the effort.

I have edited templates on my own site.

1602949122443.png
 
Solution
Top