BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #932

    Sorry for delay.

    It’s perfect thank you!

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #774

    Hello Brajesh, yes i want to have a total count of both posts and concours’posts from a user

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #773

    I understand and i thank you for your clarifications but it’s a strange limitation from wp and/or buddypress

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #761

    I try this but no luck

    $count = $wpdb->get_var( $wpdb->prepare( “SELECT count(‘*’) FROM {$wpdb->posts} WHERE post_author=%d AND (post_status=’publish’||post_status=’draft’||post_type =’Concours’)”, $user_id ) );

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #746

    of course! custom post type is call “Concours”

    Thank you Brajesh!

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #745

    Ok so if i understand it’s not depend of the activity of user’s profile, but global activity loop?

    (I think)Buddypress natively apply the second approach with their notification system, correct me if i am wrong (maybe it’s notifications coming from another plugin)

    Unfortunatly i am not a dev so i can’t help you technicly on this, only thing i can do is give you some money to help the process.

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #736

    Thank you Brajesh!

    1. so basicly i must write it like this ?

    $query_args = array(
    ‘author’ => bp_displayed_user_id(),
    ‘post_type’ => array( ‘post’, ‘name of the custom post type’, ‘other-post-type’),//all post types
    ‘post_status’ => $status,
    ‘paged’ => intval( $paged )
    );

    2. the code you provide doesn’t work for me. the number is now ‘123’ whereas i have only 6 posts (3 normal post and 3 custom post)

    Thank you for your time

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #651

    Hello and thank you Brajesh.

    it s working but inotice 2 things;

    – In order this to work, you need in buddyblog setting to change blog post type from post to custom post type name (for me it was “Concours”). If not, it will not display custom post type but only posts.

    – Next to the posts tab in submenu, the number display is not accurate. In my case for exemple i have 6 posts (3 regular and 3 custom post type) and it mark only (3)

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #644

    Maybe i must use a function to override without modify core files?

  • Participant
    Level: Initiated
    Posts: 10
    richard gueron on #639

    Hello Brajesh 😉

    No i only want to display both regulars posts and custom post type on their profil. I use gravity form in front end for users to be able to write their post and custom post type.

    Do i need to modify a core file of your plugin?

    Thank you