BuddyDev

Search

Replies

  • Participant
    Level: Guru
    Posts: 900

    (alphabetical) works by default with or without it, I have also tried online, newest, random and popular which are all not working.

    I also made sure to clear my cache everytime

  • Participant
    Level: Guru
    Posts: 900

    I also have this code

     function open_external_links_in_new_tab_bp_activity( $query_string, $object ) {
      if ( $object != 'activity' ) {
        return $query_string;
      }
      ?>
      <script type="text/javascript">
      var links = document.getElementsByTagName("a");
      for (var i = 0; i < links.length; i++) {
        var link = links[i];
        if (link.hostname != window.location.hostname) {
          link.target = "_blank";
        }
      }
      </script>
      <?php
      return $query_string;
    }
    add_filter( 'bp_ajax_querystring', 'open_external_links_in_new_tab_bp_activity', 10, 2 ); 
  • Participant
    Level: Guru
    Posts: 900

    I have this code in my bp-custom.php file

     function theme_alter_members_parse_args( $loop ) {
    	if ( bp_is_members_directory() ) {
    		{
    		$loop['per_page'] = 12;
    		}
    	}
    	return $loop;
    }
    add_filter( 'bp_after_has_members_parse_args', 'theme_alter_members_parse_args' ); 

    and this is the shortcode im using

    [bp-featured-members view=”default” type=”newest” enable_type=”1″ max=”30″]

  • Participant
    Level: Guru
    Posts: 900

    Hi Brajesh

    I have tested the parameter but it is not working in the shortcode I think it only works when being used manually

  • Participant
    Level: Guru
    Posts: 900

    Thanks for the feedback

    Please ill like to confirm is the parameter enable_type=1 or enable_type=”1″. that is with or without “”

  • Participant
    Level: Guru
    Posts: 900
    Tosin on in reply to: [Resolved] Buddypress profile completion #48569

    Hi Brajesh

    I got this working with the code

     function buddydev_dont_skip_redirect_on_account_verification_page( $skip ) {
        global $post;
        if ( $post->post_name == 'account-verification' ) {
            if( is_user_logged_in() ){
                $skip = false;
            }
        }
        return $skip;
    }
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_dont_skip_redirect_on_account_verification_page', 20 ); 

    Strange but I should have not used this code

    if ( is_product() && $post->ID == wc_get_page_id( ‘account-verification’ ) ) {

    This is noe resolve

  • Participant
    Level: Guru
    Posts: 900
    Tosin on in reply to: [Resolved] Buddypress profile completion #48522

    I have the code not redirect users on non buddypess pages

     
    // Do not redirect users on non bp pages.
    function buddydev_skip_redirect_on_non_bp_pages( $skip ) {
        if ( ! is_buddypress() ) {
            $skip = true;
        }
        return $skip;
    }
    add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_skip_redirect_on_non_bp_pages' );
    

    but now I don’t want to skip the redirect on a specific woocommerce product page using the code provided earlier, but the code does not work. Users without profile photo can still access the (account-verification) product

  • Participant
    Level: Guru
    Posts: 900
    Tosin on in reply to: Disable ajax in follow button #48512

    This seemed to work but its not perfect

     /**
     * Disable ajax for follow button
     */
    function disable_ajax_bp_follow() {
    	if ( bp_is_user() && is_user_logged_in() && bp_displayed_user_id() ) {
        ?>
        <script type="text/javascript">
        jQuery(document).ready(function($) {
            var itemButtons = null;
            if ($('body.bp-nouveau').length) {
                itemButtons = $('ul.member-header-actions');
            } else {
                itemButtons = $('#item-buttons');
            }
    
            if (itemButtons && itemButtons.length) {
                itemButtons.off('click', '.follow-button a.follow, .follow-button a.unfollow');
                itemButtons.on('click', '.follow-button a.follow, .follow-button a.unfollow', function(event) {
                    event.preventDefault();
                    location.reload();
                });
            }
        });
        </script>
        <?php
    }
    }
    add_action( 'wp_footer', 'disable_ajax_bp_follow', 100 ); 
  • Participant
    Level: Guru
    Posts: 900
    Tosin on in reply to: Disable ajax in follow button #48503

    The code did not work, the ajax is still working instead of the whole page reloading

  • Participant
    Level: Guru
    Posts: 900
    Tosin on in reply to: Disable ajax in follow button #48480

    Hello Brajesh

    Thanks for the feedback please note that I’m using the legacy template as I can see body.bp-nouveau in the code