• Resolved reedy

    (@reedy)


    I have some bbPress forums that are only visible to paying clients. How can I stop specific forum IDs from being indexed?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    Sorry for the belated reply — it’s been a busy week behind the scenes.

    I didn’t even know bbPress supported hidden forums, so that’s an issue we may wish to tackle.

    But “paying clients” is something I cannot anticipate, so I wrote you a workaround: https://gist.github.com/sybrew/33e6ac7f4322d19fcb7bce4a919b20d5.

    Of that snippet, change line 12 to an array of the forum IDs you wish to apply noindex to. This snippet works for the back end, front end, and sitemap.

    Thread Starter reedy

    (@reedy)

    Thank you for getting back to me! Access is restricted not by bbPress, but by my LMS plugin (LifterLMS). Unfortunately, restricted topics and replies are still get added to the sitemap!

    I appreciate the workaround — I’ll give it a try and let you know if I have any issues!

    Thread Starter reedy

    (@reedy)

    I just added the code you shared to my functions.php file and entered the forum IDs I wanted to exclude on line 12.

    I then resaved the SEO settings page to flush the cache but when I reload the sitemap I am still seeing topics that are posted in the forums that should not be getting indexed.

    Any ideas?

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again! Sorry for the delay (also again…).

    Perhaps another caching plugin interfered with the correctness of the sitemap’s output — it might’ve fixed itself already. Do check before proceeding.

    Now, I have no experience with LifterLMS, so I don’t know what I’m looking for — it has a whopping 172 000 lines of code, and since LMS software generally does not adhere to the WordPress APIs, I do not know where to begin.

    I tried to follow their bbPress integration, but that doesn’t look like something I can integrate, and comes with a host of extraneous data that may cause memory exhaustion on sitemap generation (though, I mitigated that as best I could in TSF).

    You may have more luck asking their developers; lines 29 and 30 of the gist I proposed are effective here.

    Thread Starter reedy

    (@reedy)

    I appreciate you getting back to me again —?and no need to apologize for the delay!

    I think LifterLMS might be a bit of a distraction here. Let’s say it didn’t exist and I simply want to exclude specific forums (and the topics within them) from my sitemap.

    The code you shared above doesn’t seem to do that (I’ve deactivated my caching plugin and topics within the specified forum IDs are still listed in the sitemap).

    Does this make things any clearer or get us any closer to a relatively easy solution?

    Thanks again for your consideration!

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again!

    I understand you manage the content of these forums as admins only? This means there isn’t much updating going on, and that the sitemap won’t be refreshed quickly.

    If the sitemap isn’t refreshed, the snippet won’t affect it. It should still affect the topics’ metadata, however (provided you have no caching plugin).

    See: https://tsf.fyi/kb/all-you-must-know-about-sitemaps/#tsf-sitemap-updating.

    So, first activate the snippet you edited, and then resave the SEO settings or any post/topic. The sitemap’s cache should then be flushed, and hopefully the assigned content gone from it.

    If that didn’t work, I think we need to look into subforum behavior.

    Thread Starter reedy

    (@reedy)

    I have tried disabling my caching plugin (Auto Optimize) and resaving the SEO settings but the topics that exist within forums I do not want to be indexed are still appearing in the sitemap :/

    Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    I think we’re dealing with a special forum structure, such as with child and parent forums — the snippet doesn’t deal with that.

    Could you link me to the forum you wish everything has “noindex” for? You can do so confidently here: https://tsf.fyi/contact. Thanks!

    You may also wish to reach out to the bbPress developers; they know the way around their software much better than I — I haven’t used it in nearly a decade. The snippet I provided will pave the way to a proper solution.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Exclude Specific bbPress Forums by ID’ is closed to new replies.