Conditional if statement ($post->ID == get_the_ID) not working

The expression will always be true. Take a look at get_the_ID(); function get_the_ID() { global $post; return $post->ID; } So your code is effectively running as; if ( $post->ID == $post->ID ) // always true! Instead, cache the ID of the main post in a variable, then compare that instead. <?php global $post; /** * … Read more

BBPress private topics by default

bbpress forums can be marked public (accessible to all) private(filters private forums from view when the user does not have appropriate role) and hidden (Make selected forums completely hidden except to certain members or roles) which can solve your problem. Mark a forum private or hidden according to your requirement and using your members plugin … Read more

Is there a way to import Blogger into bbPress?

No, there isn’t. And unfortunately that’s because you’ve been using Blogger to do something it was never intended to do. I’m not saying this is a bad thing. Blogger (and WordPress) are built to handle an article format: One author publishes a large article Other writers create short-format comments Comments and replies are threaded together … Read more

how to edit bbp_forum_freshness_link() format

I cannot test it right now, but it should work like this: add_filter( ‘bbp_get_forum_freshness_link’, ‘wpse_77441_change_time_format’, 10, 2 ); function wpse_77441_change_time_format( $anchor, $forum_id ) { $last_active = get_post_meta( $forum_id, ‘_bbp_last_active_time’, true ); if ( empty( $last_active ) ) { $reply_id = bbp_get_forum_last_reply_id( $forum_id ); if ( !empty( $reply_id ) ) { $last_active = get_post_field( ‘post_date’, $reply_id … Read more

How to find a callback attached to a bbpress hook?

To find an attached callback, you normally can just do the following: printf( ‘<pre>%s</pre>’, var_export( $GLOBALS[‘wp_filter’][‘hook_name’], TRUE ) ); This should give you back an array of callbacks attached to a hook, ordered by priority (which serves as key).

BuddyBoss (BuddyPress / bbPress) moderation filters not doing anything

You’ve got the bp_bypass_if_user_can_moderate arguments wrong. From the documentation you linked to it should be bool $value, int $user_id, string $title, string $content, and as normal for filters you should pass through $value if you’re not going to change it. e.g. here’s a fixed up version of your filter: add_filter( ‘bp_bypass_check_for_moderation’, ‘bbp_bypass_if_user_can_moderate’, 10, 4 ); … Read more

Can’t Find BBPress data in Database

As far as I know bbPress uses custom post types. So all the data are in the regular posts and post_meta tables. A look at the source code should tell you more. From the bbPress Codex: bbPress creates three custom post types and adds them to the navigation menu: Forums, Topics, and Replies. Use these … Read more