How to add ‘Recent Posts’ in XenForo

Today we are going to discuss a pretty cool addition to any Xenforo site. The ability to have a Recent Posts page. Now this is a fairly simple thing to add so we will go ahead and add it to ours. What am I talking about? Well on a normal install you don’t have it like so:

rp1

See there isn’t a recent posts link. So how about we add it?

First log into your Admin panel and click appearances and then on the left templates. Like so:

rp2

We are looking for Navigation  page. It’s under N’s like so:

rp3

Click on it and you will see this page:

rp4

So we are looking for the following line:

 

<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>
    </xen:if>
    <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
</xen:hook>

It looks like this:

rp5

We are going to insert a new code which I have supplied below between the lines:

</xenf:if> and <li><a href=” 

The code we are adding is as follows:

<xen:if is="{$visitor.user_id}">
        <li><a href="{xen:link find-new/posts, '', 'recent=1'}" rel="nofollow">{xen:phrase recent_posts}</a></li>
    </xen:if>

So once it is all said and done the new code is as follows:

<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>
    </xen:if>
    <xen:if is="{$visitor.user_id}">
        <li><a href="{xen:link find-new/posts, '', 'recent=1'}" rel="nofollow">{xen:phrase recent_posts}</a></li>
    </xen:if>
    <li><a href="{xen:link 'find-new/posts'}" rel="nofollow">{xen:if $visitor.user_id, {xen:phrase new_posts}, {xen:phrase recent_posts}}</a></li>
</xen:hook>

It will look like this:

rp6

As always make sure that you click save. Now to make sure that it worked go to your main forum page and you will see this at the top:

rp7

When you click on it. It will take you to the Recent Posts page like so:

rp8

You have done it!

As always if you have any questions or comment’s please post them below!

Looking for quality XenForo hosting? Check out Arvixe Web Solutions

Tags: , , , , , , , , , | Posted under XenForo | RSS 2.0

Author Spotlight

Keith Pottratz

Hello My Name is Keith Pottratz. I have been working with computers for over a decade. It's my personal hobby something that I love and enjoy doing. I went to school for Computer Science, and have spent many years self teaching my self various things. I have ton's of experience in HTML,CSS, PHPBB,CPanel,CMS software, blogging software and various other systems and enviroments. My favorite thing to do though is backend developing. I find it to be a growing and ever evolving beast and I love learning about it. I look forward to giving as much knowledge as I can and help.

Leave a Reply

Your email address will not be published. Required fields are marked *