XF 2.0 Sitemap Excluded Nodes

dking

Member
Is there a way to exclude nodes or forums from the sitemap that is native to V2.0?

I have several forums that are set up as classifieds under one catagory and we automatically prune the forums to make old sales go away. Currently Google is indexing them, there is no need to have them on Google.
 
@dking

You can add this in templates forum_view and thread_view:
Code:
<xf:if is="in_array({$forum.node_id}, [X,Y,Z])">
<xen:container var="$head.robots">
<meta name="robots" content="noindex, follow" />
</xen:container>
</xf:if>

That should append noindex, follow in <head> using a conditional statement.

I'm not sure if <xen:container> still works in XF2.
 
@dking

You can add this in templates forum_view and thread_view:
Code:
<xf:if is="in_array({$forum.node_id}, [X,Y,Z])">
<xen:container var="$head.robots">
<meta name="robots" content="noindex, follow" />
</xen:container>
</xf:if>

That should append noindex, follow in <head> using a conditional statement.

I'm not sure if <xen:container> still works in XF2.
Does this hack still work?
 
Top Bottom