Add ‘Post Reply’ & ‘Post Thread’ buttons to the top of thread view pages

Sameer Memon
Sameer Memon
1 Min Read
- Advertisement -
Add 'Post Reply' & 'Post Thread' buttons to the top of thread view pages

Ever found yourself on a busy thread? scrolling throughout down to post a reply and wondered if it should have a quick reply button at the top. This would save a lot of your time and will allow commenting faster.

Well today we are going to do the same just by adding some codes in our style template.

For this head over to your ACP->Appearance->Templates.

Search for “thread_view” in template search bar. Click to edit the template.

Now scroll down to find below code. (at around line 71)

<xf:breadcrumb source="$forum.getBreadcrumbs()" />
adding post reply code in

Now just below the above code, add the following code:

- Advertisement -
<xf:pageaction>
    <xf:if is="$thread.canReply()">
            <xf:button href="{{ link('threads/reply', $thread) }}" data-xf-click="overlay" class="button--primary" icon="reply">
            {{ phrase('post_reply') }}
        </xf:button>
    </xf:if>
    <xf:if is="$xf.visitor.canCreateThread() OR $xf.visitor.canCreateThreadPreReg()">
        <xf:button href="{{ link('forums/create-thread') }}" class="button--primary" icon="write" overlay="true" rel="nofollow">
            {{ phrase('post_thread') }}
        </xf:button>
    </xf:if>
</xf:pageaction>
post reply and post thread in

once done click SAVE.

Now check any of your forum post. You will see a option to post reply right at the beginning of the post.

xenforo post reply and post thread
- Advertisement -
Follow:
Sameer Memon is a passionate writer with 3 years of experience in Blogging. With a strong background in Blogs, SEO, and Social Media Marketing, Sameer has been creating engaging content on various topics for a wide range of clients. As a dedicated and driven individual, Sameer takes pride in delivering well-researched and thoughtfully written articles that provide readers with valuable insights and information. He is constantly striving to stay up-to-date with the latest industry trends and techniques to produce content that is not only informative but also engaging and easy to read. When Sameer isn't busy writing, he enjoys gaming. He also loves to explore new places to gain fresh perspectives and inspiration for his writing. If you're interested in learning more about Sameer and his work, you can follow him on social media platform at give handles.