XF 2.3 How to filter threads blocked from search indexing from showing ad code!

Chromaniac

Well-known member
Just looking some guidance on blocking threads which are disabled for search engine indexing from appearing in sitemap and also how to filter them from advertising section. Thanks!
 
Last edited:
I did check and they do seem to appear on sitemap. Out of the box this should be part of core software I believe. But finding the relevant code to filter them out from ad code seems even more challenging lol.

I think XenForo does filter out entire forums if disabled for indexing for inclusion from sitemap. But 2.3 added thread level setting for search engine indexing and that does not seem to be excluded from sitemap from what I have seen.
 
Ok. So, my mistake. Looks like I had an outdated sitemap. Search engine indexing excluded threads do not appear in sitemap so that's nice.

Just needed some guidance on how can I also filter them out from ad codes. I am already filtering ad code for some nodes using code provided in relevant threads here. Would also like to filter out threads blocked from indexing. Thanks!

The code for nodes:

<xf:if is="!in_array({$__globals.forum.node_id}, [X,Y,Z])">
 
But 2.3 added thread level setting for search engine indexing and that does not seem to be excluded from sitemap from what I have seen.
Yes it added individual thread noindexing, but was there previously only under thread criteria and I'm fairly sure they were not included in sitemap so should be likewise for manually noidexed now with 2.3


Screenshot 2024-09-11 at 13.29.55.webp
 
Also noticed something else today lol. Tags that are only on threads that are not public also appear in sitemap if included. Enabled tags few days ago and noticed a lot of 404 reports in search console. This seems to be the reason.

Not sure if I should file it as a bug!
 
Back
Top Bottom