Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'how to hide pages'

Viewing 25 results - 1 through 25 (of 178 total)
  • Author
    Search Results
  • #333865

    In reply to: Issues with Sidebars

    jettie4521
    Participant

    check if your theme offers different page templates for BuddyPress pages, allowing customization of layouts and sidebar settings. If available, utilize these templates accordingly. Alternatively, explore the use of custom CSS to hide the sidebar on specific pages where it’s not desired, while ensuring it remains visible on profile and group detail pages

    #332410

    In reply to: BuddyPress 12.0.0

    mattobiwan1982
    Participant

    I have gone back to version 11.40 and was wondering how I can hide certain pages etc fron non regsitered members.

    #331822
    ericwillson
    Participant

    To achieve the functionality you described, you can add the following PHP code snippet to your WordPress plugin or theme’s functions.php file. This code will hide the activity form from all users except admins:

    php
    Copy code
    function hide_activity_form_for_non_admins() {
    if ( ! current_user_can( ‘administrator’ ) ) {
    ?>
    <style type=”text/css”>
    .activity-form-class {
    display: none;
    }
    </style>
    <?php
    }
    }
    add_action( ‘admin_head’, ‘hide_activity_form_for_non_admins’ );

    In this code snippet:

    current_user_can(‘administrator’) checks if the current user is an administrator.
    If the current user is not an administrator, it adds a <style> block to the <head> of the admin pages, setting the CSS property display: none; for the element with the class activity-form-class. Make sure to replace activity-form-class with the actual class name or ID of the activity form element in your HTML markup.
    EXP3RTS ensures you have a backup of your site or are comfortable with making changes to your theme/plugin files before adding this code. Additionally, modify the class name in the code to match the actual class or ID of your activity form for it to work correctly.
    I HOPE THIS IS BENEFICIAL FOR YOU

    #329901
    flamuren
    Participant

    Hi,

    I am building a membersite using buddypress, bbpress and package it with buddyx theme.

    If I visit as non-logged in I can see activites, forums, member etc. Is it possible to somehow block that? Perhaps re-direct to a login/register page as facebook does?

    Best regards,

    flamuren

    Anonymous User 18187419
    Inactive

    Hi kp,

    yes I’m with ya on keeping extra plugins to a minimum.

    Code published here…

    https://easywebdesigntutorials.com/hide-buddypress-pages-and-bbpress-forums-from-not-logged-in-users/

    …with minor modification (to remove bbpress check) seems to achieve what you want, as per below:

    function ps_guest_redirect() {
         global $bp;
      if ( bp_is_user() ) {
          if(!is_user_logged_in() and !bp_is_register_page() and !bp_is_activation_page()) {
               wp_redirect('https://google.com');
      exit;
          }
      }
    }
    add_filter( 'get_header','ps_guest_redirect',1);
    #325971
    werny
    Participant

    Hi there,

    how can I deactivate the “Public message” button on all profile pages?
    I think those 2 buttons are too confusing for the users.
    The “Private message” button is more then enough, I think

    #325139
    pagecrafterz
    Participant

    Thank you for your resonse shane but it does not work.
    I might use the wrong words for the function…

    I use it in the code snippet plugin but no luck.
    Its definitely the get user role part as this part I have seen on many forum pages…

    Is the word:”unset” the right one? Not “hide” or “remove”?

    dodo90z
    Participant

    Hi.
    I install your plugin .
    And every thing is ok.
    But the comment area still appears.
    How can hide all comments from all post.
    For example:
    https://ophthoplus.com/staging/1967/members/ophthoplus2/

    Kindly help us to remove comments ?

    #322255
    am2915061123
    Participant

    So I also have youzify plugin enabled for my Buddypress and I have been trying to get the buddypress pages to shift to the left so the content doesnt hide behind my elementor section.

    I have tried editing the css files in youzify but to no avail. Can anyone help me ?

    benofinil
    Participant

    Hello !

    First of all, I apologize if the answer already exists, but I am new to the php language, and I do not understand much …

    I created a website for an organization, and I set up a community space thanks to Buddy Press and Youzify.

    Here is my question: I want to make this space completely closed, and not accessible to non-logged in users. I tried putting this php code in wp-content / plugins / bp-custom.php:

    <? php
    / **
    * Redirect the Buddypress directories to the login page for non logged in users.
    * /
    function yzc_redirect_bp_directories_to_login_page () {

    if (! is_user_logged_in () && (bp_is_groups_directory () || bp_is_members_directory ())) {

    // Get pages Buddypress;
    $ bp_pages = get_option (‘bp-pages’);

    // Get the redirection URL
    $ redirect_url = youzify_get_login_page_url ();

    wp_redirect ($ redirect_url);
    go out();
    }
    }

    add_action (‘template_redirect’, ‘yzc_redirect_bp_directories_to_login_page’);

    Now unconnected users cannot have access to member directory and groups directory, but I would like to block access to all BuddyPress pages (such as member profile pages, activity page. ..) and redirect to the login page.

    Could someone help me complete this piece of code?
    Thank you for your help

    #316979
    duivelkewilly
    Participant

    Dear

    Is there a possibility to hide a widget on the registration form.
    I can hide or show a widget on all pages except the registration page.

    Thanks in advance
    Greetings

    electroinvention
    Participant

    @vapvarun
    Hello, thanks for replying.
    Yes, I understand. What if I put it public and want to hide anonymous access just specific pages only. So is there any alternative for that? What if I can leave it public but have the right to prevent anonymous access to certain specific pages whom I select.
    Is there any way to do that? I have tried some plugins that can prevent access to specific pages when you add their shortcodes to those pages but they don’t actually do their work.
    The problem with Buddypress and boss platforms is either they are fully public or fully private.

    Even if I put some specific links in the open URLs area of platform settings, but thing is, how many, and how many links I will put in there. That’s kinda messy and inefficient.

    I just want something I can use with these platforms, that let me private specific URLs even when I have set the platform to Public

    #316135
    haitianguy
    Participant

    Hi, i feel like im doing this properly but i never get the right result. i have a custom meta called “featured” in activity meta. For testing purposes the meta values are 1,2,3,4 my goal is to have an activity loop order activities by the meta value. i’ve checked the documentation and i came up with this.

    
    <?php
    
    get_header(); ?>
    
    <?php get_template_part('page-parts/general-title-section'); ?>
    
    <?php get_template_part('page-parts/general-before-wrap');
    
    $atts =  array(
    			'title'            => 'Latest Activity',// title of the section.
    			'pagination'       => 1,// show or not.
    			'load_more'        => 0,
    			'display_comments' => 'threaded',
    			'include'          => false,     // pass an activity_id or string of IDs comma-separated
    			'exclude'          => false,     // pass an activity_id or string of IDs comma-separated
    			'in'               => false,     // comma-separated list or array of activity IDs among which to search
    			'sort'             => 'DESC',    // sort DESC or ASC
    			'page'             => 1,         // which page to load
    			'per_page'         => 5,         // how many per page.
    			'max'              => false,     // max number to return.
    			'count_total'      => true,
    
    			// Scope - pre-built activity filters for a user (friends/groups/favorites/mentions).
    			'scope'            => false,
    
    			// Filtering
    			'user_id'          => false,    // user_id to filter on
    			'object'           => false,    // object to filter on e.g. groups, profile, status, friends
    			'action'           => false,    // action to filter on e.g. activity_update, new_forum_post, profile_updated
    			'primary_id'       => false,    // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    			'secondary_id'     => false,    // secondary object ID to filter on e.g. a post_id.
    
    			// Searching
    			'search_terms'     => false,         // specify terms to search on.
    			'use_compat'       => bp_use_theme_compat_with_current_theme(),
    			'allow_posting'    => false,    // experimental, some of the themes may not support it.
    			'container_class'  => 'activity',// default container,
    			'hide_on_activity' => 1,// hide on user and group activity pages.
    			'for'              => '', // 'logged','displayed','author'.
    			'role'             => '', // use one or more role here(e.g administrator,editor etc).
                'for_group'        => '',// group slug.
    		);
    
    		$atts['meta_query']= array(
                                        array(
                                            'key' => 'featured',
                                            'value' => '0',
                                            'type' => 'numeric',
                                            'compare' => '!=',
                                            ),
                                            'meta_type' => 'numeric',
                                    'orderby' => 'meta_value_num',
                                    'meta_key' => 'featured',
                                    'order' => 'DESC'
                                    );
    
     ?>
    			<div id="buddypress">
    	
    
    		<?php do_action( 'bp_before_activity_loop' ); 
    		
    		
    		
    	
    
    if ( bp_has_activities( $atts ) ) : ?>
    
                <div class="<?php echo esc_attr( $atts['container_class'] ); ?> 
                <?php if ( ! $atts['display_comments'] ) : ?> hide-activity-comments<?php endif; ?>">
    
                    <ul id="activity-stream" class="activity-list item-list">
    
    					<?php while ( bp_activities() ) : bp_the_activity(); ?>
    						
    						<?php bp_get_template_part( 'buddypress/activity/entry' ); ?>
    					<?php endwhile; ?>
    
    					<?php if ( $atts['load_more'] && bp_activity_has_more_items() ) : ?>
                            <li class="load-more">
                                <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a>
                            </li>
    					<?php endif; ?>
                    </ul>
    
    				<?php if ( $atts['pagination'] && ! $atts['load_more'] ) : ?>
                        <div class="pagination">
                            <div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
                            <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
                        </div>
    				<?php endif; ?>
    
                </div> 
    
            <?php else : ?>
                <div id="message" class="info">
                    <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p>
                </div>
            <?php endif; ?>
            
    ?>
    			</div>
    		
    
    		<?php do_action( 'bp_after_activity_loop' ); ?>
    
    <?php get_template_part('page-parts/general-after-wrap'); ?>
    
    <?php get_footer(); ?>
    

    everything here works except for the order. for some reason it always orders by activity ID. am i missing something here? Thanks in advance im going crazy with this.

    amtenbrink
    Participant

    Hi!

    when i integrate buddypress items (such as profile, messages, groups…) in the menu, they are just shown if the visitor is logged in.

    when i integrate a regular page (i created in wordpress) in the menu, it is shown weather the visitor i slogged in or not.

    when i copy the css class of a buddypress menu item (e.g. bp-menu bp-settings-nav) and paste it in the css field of the regular page, this menu item is also just shown to logged in visitors. this is exactly what i need!

    the problem is just, that it kind of confuses the menu. all tems with the same class are spoken at once.

    is it possible to create my own css class of the same kind, that hides the menu items in case the visitor isn’t logged in?!

    thanks a lot!!!

    werny
    Participant

    I want to move or hide the Activity component in the detail-user-pages.
    As default, when you open a profile page, you see his activity feed.
    But I want to show up his profile details first, and the activity as a second component.
    How can I change that?

    #280343
    antabc
    Participant

    Hi!

    Is it possible to hide members own pages from other users than admin.

    Example if I have users “user1” and “user2”.

    If User1 is in his own page “www.yourdomain.com/members/user1”

    User1 can acces to User2 own page by changing only url to “www.yourdomain.com/members/user2”

    #278498
    dennymar
    Participant

    Hello, I searched existing posts but didn’t find this exact question.
    On the members’ page, and on individual profile pages, it shows the time the member was last active. (example ‘active 3 minutes ago’)
    I’d like to hide/turn this off but can’t figure out where or how to do this. I have turned off the activity stream but that didn’t do it.
    Is there a snippet of code I need to change or add to accomplish this?

    I changed the theme to twenty-seventeen and it still shows up.
    Wordpress version 4.9.8
    BuddyPress version 3.2.0

    This will (temporarily) take you directly to the member ( ‘Connect’ ) page.

    Thank you!
    Denise

    #274830
    Ritu Singh
    Participant

    Thank you @venutius for the quick response.

    The code you provided I can use on member list page to hide members with an incomplete profile. I have found a way of calculating member’s profile completeness percentage.

    Will it be good using template_redirect hook to redirect member profile pages with incomplete profile. For eg. http://domain.com/members/jeeny/ to reditect on http://domain.com

    #269758
    inderlovy
    Participant

    Which is best plugin to show particular pages after login from buddypress and hide rest of the pages?

    #269378
    grimbot
    Participant

    ok.. it works again.. Not sure which step fixed it but here is what I did..

    In the database area I clicked the Optimize, repair, and reset permission buttons.

    In wordpress I cleared off some of the warning notifications I was getting about “Activity Stream” and “User Links” pages not having pages set for them..

    I had those removed on purpose btw.

    The code to hide the members directory doesn’t work anymore but someone said something about maybe being able to redirect traffic to that page to a password protected or otherwise restricted page.

    So.. That should do it if you have the problem I did.. clear the page missing error for user links and activity and run the one click fixes on the database to reset permissions and such.

    Boone Gorges
    Keymaster

    Hi @richardmiller-1 – The purpose of the @username part of the interface is to tell other users how to mention the user when posting new activity items, etc. It’s possible to change the value that’s displayed here, but if you do, and if users then use that text to “mention” others, then things like auto-linking of @-mentions and @-mention notifications will break, since BP doesn’t know by default how to search by display names.

    If you just want to change the display, then you should copy the cover-image-header.php template to your own child theme, and then change the line you’ve referenced to:

    
    <h2 class=”user-nicename”>@<?php echo bp_core_get_user_displayname( bp_displayed_user_id() ); ?></h2>
    

    It might be possible to retool some of the @-mention plumbing so that notifications etc work. You’d want to start by filtering bp_activity_mentioned_users(), and copying some of the logic in bp_activity_find_mentions() but with modified regex + user lookup. (This is going to be hard because, among other things, display names are not necessarily unique across a network, so @Richard could refer to multiple people. But that depends on the nature of your network.)

    The h1 at the top of the profile page is generated in a weird way, as part of BP’s theme compatibility system. It’s not directly generated by BP, but comes from your WP theme; BP is faking the theme into thinking that the user’s display name is the title of the WP page, so that your theme’s page.php template outputs it as the_title(). There are various workarounds for this. One is to tap into BP’s template hierarchy, so that WP would use a separate template file for single member pages. See https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/#single-member-pages for details. Basically, you’d copy page.php to buddypress/members/single/index.php, and remove the call to the_title(). A simpler solution is to hide with CSS:

    
    .bp-user .entry-title {
    	display: none;
    }
    
    #265687
    threwthenevr
    Participant

    Tyvm for the reply.

    It seems I get redirected to a 404 page when the resend activation email link is clicked.
    Here’s the path that leads to it.
    /wp-login.php?action=bp-resend-activation&id=3586&_wpnonce=1fc8482a5b
    Most likely a plugin conflict since I hide wp pages from the public.

    I’m trying to do something similar like the code below.
    class=”bp_registration_needs_activation”>Resend Activation Email

    #264120
    djsteveb
    Participant

    interesting recent discussion on the privacy thing here: https://buddypress.org/support/topic/hide-members-from-search-results/#post-264118 – hope others can chime in on best practices for the future.

    An easy way to choose that gives put in and what gets left out of the main activity stream is a top issue I think for bp, as well as an easier way to manipulate page titles, meta descriptions, and other content on the bp-psudoe pages likes groups and member profiles is a consistent pain point for many.

    hopefully media handling will get more standardized.

    #264118
    djsteveb
    Participant

    @johanna75 – We do need some kind of universal “display public ok” field perhaps?

    Some people have fields set to ‘friends only’ – so things in search should only display to them.

    Bp has a thing in it when a user is marked as spam, then they are only visible to admins – so I think this kind of functioning is half in there already.

    Would be nice for the buddyblock and rtmedia plugins to also consider this visibility thing, and for buddyblock to be able to conditionally affect that as well.

    I could see the need for someone to hide certain things from the public and from specific people – what a nightmare it is when things that were assumed secret pop up in search results.. I had this happen with a wp install – pages published but password protected – well either the theme, or the post teaser plugin pulled data from those non public pages and put them smack in the public search results.

    Luckily the bp profile search pluing (that I also use – it’s great!) – is under active development – (I see the author has responded to the support forum on wp repo saying it is an issue that is under consideration, but bp does the same thing – so it’s no different in the privacy regard) wonder if we could ping the other bp peeps and rtmedia and buddyblock peeps tp put some heads together on this..

    I have a similar problem right now with rtmedia not meshing with buddyblock. When a user blocks and enemy on my site – that enemy can not message them or comment on their activity – but they can harass the sh*t out of them via comments on their media.

    #261775
    Venutius
    Moderator

    There’s a few different ways you could go about this, there’s a few privacy plugins that will hide different aspect of the site from public view. One is BP Registration Options, this installs new member moderation (so you can choose who to allow on you site) and BuddyPress privacy, where the BuddyPress pages are all private, but the WordPress pages and posts are still public.

    If that’s not private enough for you then there’s BP Simple Private which allows you to hide all aspects of your site apart from the homepage.

Viewing 25 results - 1 through 25 (of 178 total)
Skip to toolbar