-
ggsalas replied to the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
I know the problem: is the WPUF plugin. Now, the developer send me the solution:
function wpufe_modify_bp_activity( $post_id ) {
global $wpdb, $user_ID;//get the last inserted activity
$activity = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}bp_activity WHERE secondary_item_id = $post_id AND user_id = $user_ID");// if…[Read more]
-
ggsalas replied to the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
I think the problem is that i can’t get the post id. I tried with this code and it works:
return get_post_meta(577, 'txt_link', true).'This1';
I tried in many ways but I cant get the post-id to work with bp_blogs_activity_new_post_content filter
-
ggsalas replied to the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
Hi, I simplify the code and get same result: the text “this yes” appears, and the custom-field not.
add_filter( 'bp_blogs_activity_new_post_content', 'record_post_activity_content' );
function record_post_activity_content(){
return get_post_meta($post->ID, 'txt_link', true).'this yes';
} -
ggsalas replied to the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
With this code I have NO results:
function test1(){
global $post;
$test_customfield = get_post_meta($post->ID, 'txt_documento', true);
return $test_customfield;
}//function test1( $the_post ) {
// $post_id = $the_post->ID;
//}function record_post_activity_content($activity_content, $post, $post_permalink ){
if(…[Read more] -
ggsalas replied to the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
@boonebgorges YES it works!!!
But when I tried to show a custom-field stops working. This is my example code:
function test1(){
global $post;
$test_customfield = get_post_meta($post->ID, 'txt_documento', true);
return $test_customfield;
}function record_post_activity_content($activity_content, $post, $post_permalink ){
if(…[Read more] -
ggsalas started the topic [Resolved] Custom-fields in Activity-content, error with function in the forum Creating & Extending 11 years, 5 months ago
Hi, i need add custom-fields to activity-content.
I can’t do this. In this example I show that the text “this yes” appears in activity and “test1” function not appears. This function is what I need to show my custom fields.
Thanks
function test1(){
echo 'this not';
}function record_post_activity_content($activity_content, $post,…[Read more]
@ggsalas
Active 5 years, 8 months ago