XF 1.5 how to disable post new thread button?

Hi all,
I want to post new thread button is disable my site due to some technical process. how to disable post new thread in my forum and with out delete my code? how to solve it?
Screenshot (23).webp
 
I am using this below code to disable the post new thread button but it is not working ? how to solve it the button only not visible but functionality is working?
<!-- disabling post_new_thread
<xen:if is="{$canPostThread}">
<xen:set var="$newDiscussionButton"><a href="{xen:link 'forums/create-thread', $forum}" class="callToAction"><span>{xen:phrase post_new_thread}</span></a></xen:set>
<xen:if is="!{$renderedNodes}">
<xen:topctrl>{xen:raw $newDiscussionButton}</xen:topctrl>
</xen:if>
</xen:if>
end comment-->
 
Actually i already set the post new thread button in my home menu bar.Screenshot (24).webp

but I don't need the post new thread button in forum page Screenshot (25).webp.
so when I use the permission the post new thread button is not working?
but my aim is post new thread button is only visible in home page. and it is no need in forum page ? how to delete in forum side button is not visible?
 
Top Bottom