Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] BP-columns: cant get pages to display in footer Unless logged in as admin.

  • @jamieh05gmailcom

    Member

    Hi Hope someone can help i am a little stumped here, i have buddypress installed and can only view my footer pages when logged in as admin.

    If i log out they disappear from view, even if i type in the url i get a 404 error. If i then log in as admin they show up and the text is displayed.

    I have a custom menu set up in wordpress, Appearance – menus, labelled as footer.

    I am running a custom theme with bp-columns.

    I was wondering if anyone could point me in the direction of how to get them to show up all the time as the pages are for terms, privacy, blog, about us etc. I am not a programmer so please be patient. Any help much appreciated.

    Thanks

Viewing 25 replies - 1 through 25 (of 37 total)
  • @mercime

    Participant

    @goldbrick said in my profile update

    Hi Mercime

    Thanks for the reply, i did post over at buddypress but did not get a response so i thought i would try here.

    By Footer pages i mean i have created pages in wordpress called terms, privacy, about us, blog etc. and they oonly show up in the footer area of the site when i am logged in as admin, if you where to view the site now in the footer there is just a copywrite text in the footer.

    Even if i type the URL of the page into the browser the page does not display it comes up with a 404 error. If i then log in as admin and do the same the page will display?

    I hope i have explained it ok.

    Thanks
    Jay

    @mercime

    Participant

    Continued from https://wordpress.org/support/topic/pages-not-showing-on-buddypress-system?replies=4

    @jamieh05atgmail.com and @goldbrick

    == show up in the footer area of the site when i am logged in as admin, ==

    Still not clear. If you’ve added template codes to “call” Pages in specific areas of the site, then you should see the Pages whether you’re admin or not, unless you’ve added a conditional statement `if (is_super_admin)` in front of the code … did you?

    It would help if you posted a link to a screenshot of what you see as Super Admin or Site Admin along with site URL or another screenshot of what’s happened next. What theme are you using?

    @goldbrick

    Member

    yes thats right,

    @goldbrick

    Member

    ok site url is http://www.sportzmonkey.com i will take a screen shot of the site when logged in

    @goldbrick

    Member

    i am using bp-columns theme

    @mercime

    Participant

    Will be checking it out.

    @mercime

    Participant

    EDIT – “Unable to connect. Firefox can’t establish a connection to the server at http://www.sportzmonkey.com
    Tried opening the site in Chrome and Safari, the site just doesn’t open.

    @goldbrick

    Member

    sorry may have been me try this http://www.sportzmonkey.com/

    @mercime

    Participant

    @goldbrick put a backtick before and after your code because it’s not rendering well in this forum – aside from wrecking the layout :-(

    @goldbrick

    Member

    heres a link to a screen shot of me logged in you will see the pages now showing the the footer.

    http://wallowit.com/images/screenshot.jpg

    @mercime

    Participant

    @goldbrick that screenshot link goes to “Unable to connect. Firefox can’t establish a connection to the server at wallowit.com.”

    @goldbrick

    Member

    sorry about this Mercime i think my server is playing up i will look in to it now

    @goldbrick

    Member

    it shold be working now sorry

    @mercime

    Participant

    @goldbrick screenshot link not working, same error message.

    @goldbrick

    Member

    Hi Mercime

    Dont why that is but here i have put it up on a page of a site i dont use.

    http://www.allinonemedia.co.uk/
    See is this helps.

    @mercime

    Participant

    Ok, I see the screenshot now. And yes, you have links to the Pages (text so small I can’t read them all) at the footer of your theme.

    In actual site (home page) looking at page source, I see the empty div
    `

    `
    wp_nav_menu is being called but not rendered. This is because the function is not supported in your theme.

    Open up functions.php file of your theme https://themes.svn.wordpress.org/bp-columns/1.2/functions.php
    and add the following line just above closing `?>`

    `add_action( ‘init’, ‘register_goldbrick_menus’ );

    function register_goldbrick_menus() {
    register_nav_menus(
    array(
    ‘footer-menu’ => __( ‘Footer Menu’ )
    )
    );
    }`
    Then save and upload.

    Open up your footer.php and replace:

    `<?php wp_nav_menu(
    array(
    ‘theme_location’ => ”,
    ‘menu’ => ”,
    ‘container’ => ”,
    ‘container_class’ => ”,
    ‘container_id’ => ”,
    ‘menu_class’ => ”,
    ‘menu_id’ => ”
    )
    ); ?>`

    with

    ` ‘footer-menu’ ) ); ?>`

    Then save and upload.

    In dashboard Appearance > Menus. Choose Footer Menu and add the links.

    @goldbrick

    Member

    Thanks Mercime

    But they still dont show on the home page, my functions file had a bit more code in it then what was shown above here it is just incase this makes a difference
    `<?php

    register_sidebars(1,
    array(
    ‘name’ => ‘left sidebar’,
    ‘before_widget’ => ‘

    ‘,
    ‘after_widget’ => ‘

    ‘,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘


    )
    );

    //function myavatar_add_default_avatar($url){
    //return get_stylesheet_directory_uri().’/_inc/images/default-avatar.png’;
    //}
    //add_filter(‘bp_core_mysteryman_src’, ‘myavatar_add_default_avatar’);

    function my_default_get_group_avatar($avatar){
    global $bp, $groups_template;
    if(strpos($avatar,’group-avatars’)){
    return $avatar;
    }else{
    $custom_avatar = get_stylesheet_directory_uri().’/_inc/images/default-avatar.png’;
    if($bp->current_action == “”)
    return ‘group->name).'” />’;
    else
    return ‘group->name).'” />’;
    }
    }
    add_filter(‘bp_get_group_avatar’, ‘my_default_get_group_avatar’);

    add_action( ‘init’, ‘register_goldbrick_menu’ );

    function register_goldbrick_menu() {
    register_nav_menu( ‘footer-menu’, __( ‘Footer Menu’ ) );
    }
    ?>`

    @mercime

    Participant

    I have corrected the original code posted above to be added in the functions.php file. Forgot to add `=>`

    @goldbrick

    Member

    Hi Mercime

    I added the extra bit still no joy, just an example of whats happening if you click on the create account button on the home page then you will see a tick box saying agree to our terms there is a link there to that page, if you click that you will get a 404 error, However when i log in as admin that same url will become visible.

    thanks for all your help so far i really appericate this.

    @mercime

    Participant

    == I added the extra bit still no joy ==

    Hmm, I know the code works. I assume you revised the whole wp_nav_menu code in your functions.php with the whole code I posted above.
    – Post content of your footer.php here.
    – Did you create a new menu in Appearance > Menus – Choose Footer Menu from Theme Locations and clicked on Save after creating the links?

    == if you click that you will get a 404 error, ==

    – Deactivate all plugins except BuddyPress then re-run Settings > Permalinks – Save.

    @goldbrick

    Member

    I did revise the code in the functions.php file with the whole code you posted above.

    Here is my footer.php code.
    `

    `

    i also created a new menu called footer menu and added the links but still not showing.

    I have also deactivated the plugins and redone the permalinks but still page showing 404 error

    @goldbrick

    Member

    heres the complete function.php code
    `<?php

    register_sidebars(1,
    array(
    ‘name’ => ‘left sidebar’,
    ‘before_widget’ => ‘

    ‘,
    ‘after_widget’ => ‘

    ‘,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘


    )
    );

    //function myavatar_add_default_avatar($url){
    //return get_stylesheet_directory_uri().’/_inc/images/default-avatar.png’;
    //}
    //add_filter(‘bp_core_mysteryman_src’, ‘myavatar_add_default_avatar’);

    function my_default_get_group_avatar($avatar){
    global $bp, $groups_template;
    if(strpos($avatar,’group-avatars’)){
    return $avatar;
    }else{
    $custom_avatar = get_stylesheet_directory_uri().’/_inc/images/default-avatar.png’;
    if($bp->current_action == “”)
    return ‘group->name).'” />’;
    else
    return ‘group->name).'” />’;
    }
    }
    add_action( ‘init’, ‘register_goldbrick_menus’ );

    function register_goldbrick_menus() {
    register_nav_menus(
    array(
    ‘footer-menu’ => __( ‘Footer Menu’ )
    )
    );
    }
    ?>`

    @goldbrick

    Member

    would there be any code somewhere to hide pages unless an admin user?

    @mercime

    Participant

    @goldbrick very strange, you said you deactivated all plugins except BuddyPress.
    – If you have bp-custom.php in plugins folder rename that to deactivate
    – if you have an mu-plugins folder, rename that to deactivate

    I was going to check source and styling but I’m getting a “500 Internal Server Error” from your site right now.

    @goldbrick

    Member

    Hi Mercime

    yes i had an issue with my index.php file which is sorted now and the site is back up, i will have a look and see if i can find the 2 files, i did deactivate all the plugins except buddypress last time. i will try it again.

Viewing 25 replies - 1 through 25 (of 37 total)
  • The topic ‘[Resolved] BP-columns: cant get pages to display in footer Unless logged in as admin.’ is closed to new replies.
Skip to toolbar