Skip to:

Hide Links

  • Hi,

    is there a plug in to Hide Links(including email etc) from guests and a guestbook for each user profile aaaaand a better Private Messaging Plug in?

    couldn’t find anything in the plug in DB

Viewing 7 replies - 1 through 7 (of 7 total)
  • and a more accurate posting time!



    What version of bbPress are you using?


    I also would love to know how to hide links in some sections of my forum for non-registered users.

    I have a download section, and I’d like to keep the links only visible to registered users. Perhaps also put a message only visible to non-registered users that they need to register to see the links, when they’re viewing topics in the download section.

    Any ideas?

    why r u hide that

    technically u have to make visibility false to hide link

    I think should do it, it’s based off code here:

    Change the values of $forums to the forum IDs of those you wish to restrict (it’ll only work on direct parent forums, not grandparents or categories, I don’t want to include walker code unless people need it).

    Tested on 1.0.2 trunk, so I’m not 100% sure it’ll run on 0.9, sorry.

    Plugin Name: Remove Links (conditional)
    Description: Removes links for non-registered users. Based on <a href="">bb tweaks</a>.
    Plugin URI:
    Version: 0.01

    function bb_strip_links( $text ) {
    global $topic;

    $forums = array(

    if ( !in_array( $topic->forum_id, $forums ) )
    return $text;

    if ( !bb_current_user_can( 'write_post' ) )
    $text = preg_replace('|<a (.+?)>(.+?)</a>|i', 'Login or register to download', $text);

    return $text;


    add_filter('post_text', 'bb_strip_links');


    @Hanratty: hiding links using CSS visibility will still leave the link URLs in the code, which isn’t too desirable for some

    @Shagalaga: Maybe you could use a hidden forum for guestbooks? One topic per user that’s had a comment posted, just use the existing topic functions and a modified post form on the bottom of their profile?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar