Search

How to Create a Latest Posts Page in XenForo

  • Thread starter EmeraldHike
  • Start date
EmeraldHike

EmeraldHike

Member
Joined
May 10, 2021
Messages
133
Reaction Score
0
Points
21
  • #1
It's widely known that the What's New pages in XenForo should be blocked in your website's robots.txt file. These pages replicate to infinity in relation to user sessions. The thing is, Google loves pages like this and wants to crawl them to no end. I have one website where Google crawled over 20,000 of these duplicate pages before I caught on to what was going on and blocked them. It's been over a year and I'm still waiting for them to delete from Google's index. Terrible situation.

Anyway, since Google loves to crawl the fresh content on these "latest post" or "latest thread" pages, I thought it would be a good idea to make one that's not self replicating and fully search engine friendly. So that's what I did. It's a really easy process that I'll lay out below.

Okay, here are the instructions. Nice and step by step.

- Login into your XenForo admin panel.
- Click on Forums > Nodes.
- Once on the Nodes page, click on the blue Add Node button up top.
- In the Node Type drop down, choose Page and then click the blue Proceed button.
- For the URL Portion field, type in what you would like to see in the address bar. If you want something like, yoursite.com/pages/latest-posts/, then type latest-posts.
- Add a title for the page and then a description. These will both appear on the page itself as well as in the meta information in the code.
- Don't add a parent node and uncheck the box that says Display in the Node List.
- Next, click the Save button down at the bottom of the page.
- At this point, you'll need to visit the Appearance > Widgets page to create a newest post or newest thread widget.
- On this page, click the Add Widget button up top.
- In the Widget Definition drop down, choose either New Posts or New Threads, depending on what you'd like to have show on your new page.
- Set your widget up and be sure to give it a unique widget key.
- Go back to the page you created earlier and inside the Template HTML section, paste your widget key code, including your unique widget key you just created. The entire key should look something like this:

Code:
<xf:widget key="LatestThreads" />

And that's it! If you would like to change anything on the page, simply go back into the widget settings to do so. Let me know what you think.
 
Top