Trackbacks
-
I see that users have been asking to fix this problem for years. I am getting hit hard by this on my site. I cannot disable trackbacks. Before I remove BBPress from my site, do you have a patch to fix this annoying problem in your software?
Peter
-
I just looked in trac, and fixing this is now a 2.8 goal.
However this looks like it might help
// Force ping_status on bbPress post types add_filter( 'pings_open', 'rew_force_ping_status' ); function rew_force_ping_status( $open, $post_id = 0 ) { // Get the post type of the post ID $post_type = get_post_type( $post_id ); // Default return value is what is passed in $open $retval = $open; // Only force for bbPress post types switch ( $post_type ) { case bbp_get_forum_post_type() : case bbp_get_topic_post_type() : case bbp_get_reply_post_type() : $retval = false; break; // Allow override of the override return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); }
OK…do I put this on a forum page as HTML?
TNX
OK I added the plug-in. Can you give some specific instructions on how to enter the code?
Do I do this for each forum page?
TNX Robin.
Peter
if you have put the code in the plugin – that’s it !
On a load, the code looks to see if it is a topic or reply, and if so turns off pingbacks
I put in the code and got a syntax error. I loaded it in just as you wrote it. So it will not run.
Can you check on this please?
Here is what you posted:// Force ping_status on bbPress post types add_filter( 'pings_open', 'rew_force_ping_status' ); function rew_force_ping_status( $open, $post_id = 0 ) { <strong>// Get the post type of the post ID $post_type = get_post_type( $post_id ); // Default return value is what is passed in $open $retval = $open; // Only force for bbPress post types switch ( $post_type ) { case bbp_get_forum_post_type() : case bbp_get_topic_post_type() : case bbp_get_reply_post_type() : $retval = false; break; // Allow override of the override return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); } </strong>
you seem to have and in your code, that is not in the version I posted
I dont get it. I copied your code exactly as below. Is there an AND symbol getting in there in the copy function?
// Force ping_status on bbPress post types
add_filter( ‘pings_open’, ‘rew_force_ping_status’ );function rew_force_ping_status( $open, $post_id = 0 ) {
// Get the post type of the post ID
$post_type = get_post_type( $post_id );
// Default return value is what is passed in $open
$retval = $open;
// Only force for bbPress post types
switch ( $post_type ) {
case bbp_get_forum_post_type() :
case bbp_get_topic_post_type() :
case bbp_get_reply_post_type() :
$retval = false;
break;
// Allow override of the override
return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
}sorry, should have put ‘code’ round the sentence
so should have read
‘you seem to have
<strong>
and</strong>
in your code, that is not in the version I posted’but if that is not the issue, can you post the exact error you are getting
OK…here is what I get for an error message:
The code snippet you are trying to save produced a fatal error on line 19:
syntax error, unexpected end of file
ah – thanks – try this
// Force ping_status on bbPress post types add_filter( ‘pings_open’, ‘rew_force_ping_status’ ); function rew_force_ping_status( $open, $post_id = 0 ) { // Get the post type of the post ID $post_type = get_post_type( $post_id ); // Default return value is what is passed in $open $retval = $open; // Only force for bbPress post types switch ( $post_type ) { case bbp_get_forum_post_type() : case bbp_get_topic_post_type() : case bbp_get_reply_post_type() : $retval = false; break; // Allow override of the override return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type ); } }
OK Robin…that worked! I’ll see how it goes.
Peter
great !
- You must be logged in to reply to this topic.