BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Loop Subnav Function #672

    Ok,
    Here is a slightly modified version of your last function

    
    function list_author_used_terms($author_id){
    
        // get the author's posts
        $posts = get_posts( array('post_type' => 'post', 'posts_per_page' => -1, 'author' => $author_id) );
        $author_terms = array();
        //loop over the posts and collect the terms
        foreach ($posts as $p) {
            $terms = wp_get_object_terms( $p->ID, 'collection');
            foreach ($terms as $t) {
                $author_terms[$t->term_id] = $t;
            }
        }
        return $author_terms;
    }
    
    

    and here is an example use

    
    
    $terms = list_author_used_terms( 1 );
    $links = array();
    foreach( $terms as $term ) {
    	$links[] =  sprintf( "<a href='%s'>%s</a>", get_term_link( $term ), $term->name );
    }
    
    echo join( '', $links );
    
    

    Hope that helps.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Can't seem to get it to work #669

    That is where I found it.
    here is the cover image for that gallery

    http://sacredvale.org/wp-content/uploads/mediapress/members/3/3300/soninv2010h-200×200.jpg

    So MediaPress is correctly uploading/saving it.

    When you try to access that image, you will see the error message.

    Are you sure you don’t have this plugin installed
    https://wordpress.org/plugins/wp-performance-pack/

    See here an example
    https://wordpress.org/support/topic/all-images-broken-when-un-installing

    I do not use that plgin, so you need to somehow allow wp-content/mediapress to be accessed.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Can't seem to get it to work #667

    You have some plugin/rewrite rules causing this issue. If I directly try to access the mediapress image, I see this message

    WPPP dynamic images deactivated for this site

    Can you please look into that.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722

    Wow, That was some fast reply 🙂
    Sure, we are going to have some good time today after the release 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24722

    Hi Jan,
    Just updating that a new update is coming in couple of hours now. That should fix all the bugs.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Ajax Registration with Social Login #660

    Thank you. It will need some css. Will check with social login today and provide you the css.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Can't seem to get it to work #659

    Hi george,
    Can you please point me to your site/activity page?

  • Keymaster
    (BuddyDev Team)
    Posts: 24722

    Hi Richard,

    Thank you

    1. You are right about that. The reason is I used ‘buddyblog_get_posttype()’ in the array. You can replace that by the custom post type and it won’t need you to select them in the settings.

    2. This requires a change in core file, Please open buddyblog-functions.php and on line 58

    change

    
    $count = $wpdb->get_var( $wpdb->prepare( "SELECT count('*') FROM {$wpdb->posts} WHERE post_author=%d AND post_type=%s AND (post_status='publish'||post_status='draft')", $user_id, buddyblog_get_posttype() ) );
    
    

    to

    
    $count = $wpdb->get_var( $wpdb->prepare( "SELECT count('*') FROM {$wpdb->posts} WHERE post_author=%d AND (post_status='publish'||post_status='draft')", $user_id ) );
    
    

    That will do it.

  • Keymaster
    (BuddyDev Team)
    Posts: 24722

    Hi George,
    The plugin should allow pagination. Is it not allowing that?

  • Keymaster
    (BuddyDev Team)
    Posts: 24722
    Brajesh Singh on in reply to: Loop Subnav Function #656

    Hi,
    Just trying to find some clarifications here.
    A Term can be used by more than one user, is that correct?

    Also, you only want to display the terms used by the user and not all the terms in that particular taxonomy?