Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'how to hide pages'

Viewing 25 results - 126 through 150 (of 205 total)
  • Author
    Search Results
  • #132235
    DRAGUIAN
    Member

    OK alternative menu etc is all set up on menus page. I am using the Elbee Elgee child theme at the moment. Do I still have to do the first step of implementing that code in the headers menu (<?php
    // https://codex.wordpress.org/Function_Reference/wp_get_current_user
    $current_user = wp_get_current_user();……

    #132234
    aces
    Participant

    You should make a child of bp-default and backup files and db just in case…

    You don’t add or remove any pages from the code. The point is that it works from the built in wordpress default menu system. ( https://codex.wordpress.org/Navigation_Menus )

    To get the second menu to appear – In your child theme’s functions.php file add:
    `function register_my_menus() {
    register_nav_menus( array(
    ‘primary’ => __( ‘Header Navigation’ ),
    ‘secondary-menu’ => __( ‘Alternative Menu’ ),
    ‘another-menu’ => __( ‘Another Menu’ )
    ) );
    }
    add_action( ‘init’, ‘register_my_menus’ );
    `

    #132233
    DRAGUIAN
    Member

    Which should result in a nonmember/non logged not being able to see my activities page.

    #132232
    DRAGUIAN
    Member

    for example wp_nav_menu( array( ‘container’ => false, ‘100’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ” ) );
    } else {

    #132231
    DRAGUIAN
    Member

    Just buddypress original for now. So in the ‘menu_ID’ do I just replace that with a ‘(then my page ID’ then im guessing a comma, then ‘(page Id)’ right?

    #132229
    aces
    Participant

    You shouldn’t touch wp or bp core files.

    What theme are you using?

    In your child theme’s header.php file you replace the `wp_nav_menu` section with either of the above ( not both ).

    Then you can define two menus on appearance > menus ( primary and secondary-menu on the above example ) Set one for logged in users and one for everyone else.

    #132225
    DRAGUIAN
    Member

    I am guessing that I need to make a change in the wordpress-includes pluggable.php

    #132223
    DRAGUIAN
    Member

    I prefer the first option of serving different menus whether the user is logged in or not. Should I put that code into the themes header or funtion.php? Do I need to add to the given code it to specify which pages I want to hide from logged out users. Using latest version of wordpress and buddypress

    #132195
    aces
    Participant

    One way of doing that is by serving different menus depending whether someone is logged in or not such as
    `
    <?php
    // https://codex.wordpress.org/Function_Reference/wp_get_current_user
    $current_user = wp_get_current_user();
    if ( 0 == $current_user->ID ) {
    wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘secondary-menu’, ‘fallback_cb’ => ” ) );
    // Not logged in.
    } else {
    wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ” ) );
    // Logged in.
    }
    ?>
    `
    or another approach:
    `
    <?php
    if ( is_user_logged_in() ) {
    wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘primary’, ‘fallback_cb’ => ” ) );
    } else {
    wp_nav_menu( array( ‘container’ => false, ‘menu_id’ => ‘nav’, ‘theme_location’ => ‘secondary-menu’, ‘fallback_cb’ => ” ) );
    }
    ?>
    `
    replacing the `wp_nav_menu` bit in the ( child ) theme’s header.php file. It may need adapting depending on theme etc. Remember to make backups before editing!

    Then use the walled garden or similar techniques to redirect users if they try to reach the page directly…

    #131024
    aledmann
    Member

    I’m really sorry for dragging up an old thread but I just cannot get this to work! I also want to hide the home tab and make the forum tab default in the group pages.

    I’m running WP 3.3.1 and BuddyPress 1.5.4 and have tried every code on here to no avail! Any help would be huuuugely appreciated!!

    Thank you very much! :)

    #130121
    Hugo Ashmore
    Participant

    A child theme uses as it’s core the parent theme, it references any template pages you copy over from parent theme to child theme. The child theme files are used in preference to the same named file in parent theme likewise any functions files are read in order of child theme first then parent theme. All you need for a child theme to work is the style.css file with appropriate header block.

    I would follow mercims advise to copy over header.php and simply remove the physical markup or enclose it in php comments, display: none simply hides the visual display but doesn’t remove markup so technically it’s still there.

    aces
    Participant

    On Buddypress > Settings select No for Hide admin bar for logged out users?

    See: https://codex.buddypress.org/getting-started/configure-buddypress-components/#bp-settings

    #128815
    @mercime
    Participant

    Pagelines has video about this http://www.pagelines.com/docs/buddypress or get a free forum account there at http://www.pagelines.com/launchpad/signup.php?price_group=-128&product_id=128&hide_paysys=free or do a search in theme’s forums

    There’s also a year-old solution which you might want to check out https://wordpress.org/support/topic/problem-with-buddypress#post-1796598

    #127837

    Ok good buddy…….I downloaded and installed BP-column, but here’s the strange thing………After the install, BP-column appears in my database, but not in my wordpress dashboard with my other themes. Likewise, bp-default appears in my wordpress dashboard with the rest of my themes, but not in my database.

    I tried doing a custom.php, but I must be doing it wrong because it’s not working either. I used the plugin “hide pages,” which took the pages off the top and cleared the view of my custom header (except for a weird link labeled “home” at the end~ no idea why it’s there or where it came from). Anyway, the problem with the “hide pages” plugin is that it hides the pages from EVERYWHERE, not just the top.

    I figure I can just add the left sidebar and put my pages in there…….or another thought that I had was to figure out a way to remove the “author box” (with my name and all that) and put my pages in where that is instead.

    I’m not sure what would look better, or be the easiest way to go about it……..I’m gladly open to any suggestions you may have……..all I ask is that you take a “for dummies” approach…….lol

    #127484
    aces
    Participant

    I put it in bp-custom-php – actually it also worked in functions.php

    I’m not sure if you want the same functionality. Wrapping in `is_admin` was so that the following lines only worked on the admin pages. `remove_action` shouldn’t be necessary.

    The `define` line tells buddypress to use the wp adminbar. This adds the personal menu under your name like on this page and gets rid of some blank space under the menu bar. It also stops the buddybar being rendered (behind the WP admin bar – see WP bug mentioned above). I can not find a simple way to use the buddybar instead of the wp adminbar on the admin page – but I think that’s the way WordPress wants it to work…

    For the public facing side I have selected Hide admin bar for logged out users? so you only see the buddybar when logged in.

    What are you trying to achieve?

    Hi, Mercime. I am using Salutation by para.llel. us It has been recently revamped for use with Buddypress and I can see that many members seem to be doing fine. I am sure it is something I have done. I have changed only one setting under buddypress and that is ‘hide admin bar for logged out users’. I messed up initially on my pages set-up, so had to go back and re-install bp to get the permalinks working right. Now everything but this section works – it throws me out to google and says it is a broken link:

    Oops! This link appears to be broken.
    Suggestions:
    Go to http://www.­atlantagardening­forum.­com
    Search http://www.atlantagardeningforum.com for members admin settings general

    I will try switching back to bp default and see what happens.

    #125921
    abysshorror
    Member

    I added a custom menu (from WordPress) and select only the pages I wanted to be there. This is a quick fix but I think if somebody knows the URL it would still be accesible. I’d like to see a plugin or something to hide the members page from anyone.

    Cheers !

    #119752
    Quint
    Participant

    @modemlooper, maybe it’s there as a placeholder for future functionality? ;-) IMHO at the moment, providing a “template” option across all Pages (incl. Component pages), is somewhat misleading.

    So given your last post, are you saying that I could hide the sidebar through code in my child’s style.css? If so, how would I do that? If not, which files and how should I do it? I can figure out how to change the width on the “content”, so that shouldn’t be an issue. Sorry about asking so many questions. I am still pretty new to this. Thanks.

    FYI: I’m running BP 1.5 Beta 3

    #119742
    modemlooper
    Moderator

    Actually, component pages use their own template so won’t work. Without editing templates you can hide sidebar and change page width with CSS

    #118111

    In reply to: Profile rating system

    @christophg Sorry for the delay in getting the registration/profile idea to you. Here is what I do:

    I use S2member to keep my customers and brands separate. I then created a new profile group called “Company Profile”. I made this the last profile group. I then added the following code to the file:
    members/single/profile/edit.php

    `
    <?php if (S2MEMBER_CURRENT_USER_ACCESS_LEVEL

    ul.menu li:last-child{display:none;}
    .company-profile{display:none;}

    `

    The above code hides the profile group on the edit menu from users below level 2, my brand level. And it also hides the profile group edit fields from anyone below level two. In case the menu item shows for some reason. And, unfortunately, this will not hide the menu item from users in IE 8 and below. But it WILL hide the profile group from them.

    I tried using jquery to affect last-child in IE. Although I can get the jq to work on a test page on IE, it won’t work on the menu item… not sure why.

    Next, my brands all belong to a private group, and I use a group conditional script to show the brands profile info front and center on their profile page with custom styling. This allows the brand members only to have a slick looking page that is different from regular consumer pages.

    `

    `

    Let me know if you need anything else. Or if something doesn’t make sense.

    Hugo Ashmore
    Participant

    In case it helps there are options to the above you could try; you can add:

    bp_is_directory() to allow access to all the main BP dir pages ‘Activity’, ‘Members’, ‘Blogs’, ‘Groups’ but trying to drill down any further on links in those pages would result in redirecting to register page:

    `if( bp_is_register_page() || bp_is_activation_page() || bp_is_directory() )`

    Hugo Ashmore
    Participant

    @pinhit Kenny this is what I mentioned on your other thread and is now an example of where there are too many posts revolving around the same question :) . This solution (read the whole thread linked to above for full understanding) will work to limit access to directories or in the version above it permits access to specific pages and if not in that list of allowed directs to the signup page. I think this is your best solution rather than to try and restrict drilled down aspects of pages.

    I’ll close the other thread as it is redundant now.

    billzy
    Participant

    Just to update this to close all issues of this topics as I left with a question how to hide items based on navigation in profiles.

    So after applying the above solution into your links, then to section off other profile pages ie. I am on my profile page so i can see settings & messages tabs.. but on a friends page those boxes are hidden.

    To do this;

    ? php if (bp_current_user_id() == bp_loggedin_user_id()): ?
    Add content here that you only want to see in your personal http://www.domain.com/members/YOU
    ? php endif ?

    All this is asking is if the current profile page user ID # (for the table row) is equal to the logged in user (You) ID#…. That returns True or False… If the answer is True then move forward. .

    If your looking to reverse this idea and show something only on others profile pages simply add one ! …. !bp_current_user_id() that will reverse the effect.

    There …That took me ages but it will save anyone looking to become creative with their profile menu….

    Lastly, I will not be answering any questions about how to implement this, its a basic copy paste job now if you cant do that then perhaps look at other less flexible options.

    Hope this all helps…

    #112549
    ARHistoryHub
    Participant

    Okay, I gotcha. In order to place pages before the default buddypress menu tabs, you need to modify your theme’s header.php file. Look for some code that looks like this and paste it just after code that looks something like this <div id="header"><h1 id="logo"><a href=&quot;" title=""></a></h1>

    Now your pages will appear before your buddypress menu items. If there something specific you want, you can just hard code in the header.php file with good ole fashioned html.

    Oh, and that Exclude Page plugin will allow you to easily hide pages you create from being added to the menu.

    pcwriter
    Participant

    @italiancroydoner

    I know I`m tooting my own horn here ;-) , but my BuddyBuilder theme enables you to allow user access to individual BP components and WP pages/posts depending on logged-in/logged-out status. It also provides an optional Site Lockdown feature with/without a Splashpage on the frontpage, and an optional custom redirect page if Site Lockdown is enabled. See the bottom of the right-hand column on this page for all the Privacy features available: http://buddylite.com/buddybuilder-options/

Viewing 25 results - 126 through 150 (of 205 total)
Skip to toolbar