Forum Replies Created
-
In reply to: Redirect from page if not logged in
There must be some other issue. Remove these codes nd try to give the plugin once. See if that helps you or not.
In reply to: Redirect from page if not logged inNot an issue, just write
exit();after thiswp_redirect( 'http://www.legit-check.dk/rm_login/', 301 );and also replacetemplate_redirectwithwp.
I forgot to mention that.
If it still of no help, then please go for this plugin https://wordpress.org/plugins/simple-301-redirects/. You have to just enter the source and destination URL there.Thanks
In reply to: Private Message suggestionsOk, got it.
Please replace this
" . CUSTOM_USER_META_TABLE . "with your user meta table name most probablywp_usermetaHopefully, it will help you.
Thanks
In reply to: Redirect from page if not logged inOk, got that.
Please replace
auth_redirect();withwp_redirect( 'http://www.legit-check.dk/rm_login/', 301 );and
is_page('members')withis_page('medlemmer').I was not knowing the exact URL and page slug.
Thanks
In reply to: Private Message suggestionsHi,
Have you tried that code?
In reply to: Redirect from page if not logged inHi,
Please paste the code in your child theme’s functions.php. If you do not have child theme then install this plugin https://wordpress.org/plugins/code-snippets/ and add a new snippet there and paste this code.
add_action( 'template_redirect', 'ps_redirect_to_login' ); function ps_redirect_to_login() { if ( is_page('members') && ! is_user_logged_in() ) { auth_redirect(); } }Thanks š
In reply to: Filter Activity by CategoryWelcome š
Perfect š
In reply to: Placing profile avatar in item-navWhenever you are adding to any other place, please remove from the first place and then only paste it on second place.
Thanks
In reply to: Members Masonry – ElementIn my sense, simplest will be this:
<div class='item-meta'> <p> <?php echo bp_member_profile_data('field=Expertise') ?> </p> </div>instead of this:
echo "<div class='item-meta'><p>". bp_member_profile_data('field=Expertise')." </p></div>";In reply to: Hide specific user profile tabsOk, got that.
Please check this thread: https://buddypress.org/support/topic/how-to-hide-profile-menu-items-from-other-users/
There is a code snippet that might work for you. Just have to put your menu names.
Thanks
In reply to: Placing profile avatar in item-navHave you checked again? Maybe it is there and hidden using CSS. It seems not possible that it will not appear.
Any screencast or screenshot will help to explain more.Thanks
No, If you will check there is a function already written:
start: function() { this.setupGlobals(); // Listen to events ("Add hooks!") this.addListeners(); },just find this and in this function write
alert('completed!');Thanks
In reply to: Please help….please!Hi,
Please paste the following code in your child theme’s functions.php file:
add_action( 'bp_before_directory_groups_list' ,'ps_add_image_before_groups'); function ps_add_image_before_groups(){ echo "<img src='your_image_url_here'>"; }If you do not have child theme just add this plugin https://wordpress.org/plugins/code-snippets/ and add a new snippet and paste this code there.
Please remember to change ‘your_image_url_here’ with your image source URL.
Thanks
In reply to: slow upload – Bad PerformanceHi,
Which hosting provider you have? Please consult with them once.
Thanks
In reply to: Placing profile avatar in item-navNeeds more debugging, please try just after or before
<?php bp_get_displayed_user_nav(); ?>Thanks
Ok, got that.
Please check this thread: https://buddypress.org/support/topic/adding-xprofile-fields-to-members-directory-list-items/
Thanks
In reply to: Members Masonry – Elementecho "<div class=item-meta><p>". bp_member_profile_data('field=Expertise')." </p></div>";If I got you then you mean that item-meta class is not getting displayed there, right?
But it should work, anyways you can always wrap it like this:
echo "<div class='item-meta'><p>". bp_member_profile_data('field=Expertise')." </p></div>";Thanks
In reply to: Members Masonry – Elementohh ok got that.
/** * Buddypress Members masonry * * * @package WordPress * @subpackage K Elements * @author SeventhQueen <themesupport@seventhqueen.com> * @since K Elements 1.0 */ $output = ''; extract( shortcode_atts( array( 'type' => 'newest', 'member_type' => 'all', 'number' => 12, 'class' => '', 'rounded' => "rounded", 'avatarsize' => '', 'width_height' => '', 'online' => 'show' ), $atts ) ); //var_dump($avatarsize); $params = array( 'type' => $type, 'scope' => $member_type, 'per_page' => $number ); if ($rounded == 'rounded') { $rounded = 'rounded'; } $avatarquery = ''; if( $avatarsize == 'large' ) { $avatarsizewh = explode( 'x', $width_height ); if( isset( $avatarsizewh[0] ) && isset($avatarsizewh[1] ) ) { $avatar_width = $avatarsizewh[0]; $avatar_height = $avatarsizewh[1]; $avatarquery = 'type=full&width='.$avatar_width.'&height='.$avatar_height.' '; } } if ( function_exists('bp_is_active') ) { if ( bp_has_members( $params ) ){ ob_start(); echo '<div class="wpb_wrapper">'; echo '<div id="members-dir-list" class="members dir-list">'; echo '<ul id="members-list" class="item-list row kleo-isotope masonry '.$class.'">'; while( bp_members() ) : bp_the_member(); echo '<li class="kleo-masonry-item">' .'<div class="member-inner-list animated animate-when-almost-visible bottom-to-top">' .'<div class="item-avatar '.$rounded.'">' .''. bp_get_member_avatar($avatarquery) . kleo_get_img_overlay() . ''; if ($online == 'show') { echo kleo_get_online_status(bp_get_member_user_id()); } echo '</div>' .'<div class="item"> <div class="item-title">' .''. bp_get_member_name() . ' </div>'; echo "<div class=item-meta><p>". bp_member_profile_data('field=Expertise')." </p></div>"; echo '<div class="item-meta"> <span class="activity">'.bp_get_member_last_active().'</span></div>'; if ( bp_get_member_latest_update() ) { echo '<span class="update"> '. bp_get_member_latest_update().'</span>'; } do_action( 'bp_directory_members_item' ); echo '</div>'; echo '<div class="action">'; do_action( 'bp_directory_members_actions' ); echo '</div>'; echo '</div><!--end member-inner-list--> '; endwhile; echo ''; echo '</div>'; echo '</div>'; $output = ob_get_clean(); } } else { $output = __("This shortcode must have Buddypress installed to work.","k-elements"); }Please try this code.
Thanks
In reply to: Placing profile avatar in item-nav<div id="item-header-avatar" class="rounded"> "> <?php bp_displayed_user_avatar( 'type=full' ); ?> <?php do_action('bp_member_online_status', bp_displayed_user_id()); ?> </div><!-- #item-header-avatar -->Just paste this line after
do_action( 'bp_member_options_nav' ); ?>and it will come next to menu but may be you need to style it.Thanks
Hi,
You need to put this in an anchor
<a></a>tag, maybe the profile having only text value and link to that should be written by yourself.Thanks
Please try in different functions like
start: function() {Thanks
In reply to: Two membership directoryOk, please check this: https://codex.buddypress.org/developer/member-types/
BuddyPress had introduced member type concept and using this you can create multiple directories.
There is a paid plugin https://www.buddyboss.com/product/buddypress-member-types/ that you can check. But still, the payment and free level security need some sort of customization.
Thanks
In reply to: Members Masonry – ElementShouldn’t it to be wrote like this:
<div class="item-meta"><p> <?php echo bp_member_profile_data('field=Expertise'); ?></p></div>Please check this once.
Thanks
In reply to: Two membership directoryHi,
You can check this plugin: https://wordpress.org/plugins/buddypress-shortcodes/
But still, it will need customization to add different fields there.
Thanks