Skip to:
Content
Pages
Categories
Search
Top
Bottom

adding a page

  • I like to add a page to the main menu (Home, News, Members ..) and I’d like to add widgets to it (as we do to Members, Groups etc). I’ve search the forum but couldn’t find anything.

    If there’s a forum entry with a how-to, please point me to it, or if you have any idea how i can accomplish this, please tell me.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Avatar of Fishbowl81
    fishbowl81
    Participant

    @fishbowl81

    Those links you see are hard coded in the home theme. You can check out my beta site where I have started to play around with adding more links and doing some fun stuff with the standard theme.

    http://gorgeousgamers.com/beta/

    I’m a little confused about the widget part? If you are thinking about building your own …. (shopping cart, arcade, radio station), then you should be able to follow any of the standard examples floating around about how to build custom pieces, and add a link to that custom piece in the home theme.

    Brad

    You don’t need to hard code the links, this examples shows how to add links to the “main menu”:

    <?php

    function add_about_to_main_menu() {

    $class = (bp_is_page('about')) ? ' class="selected" ' : '';

    echo '<li ' . $class. '><a href="' . get_option('home') . '/about" title="' . __( 'About', 'buddypress' ) .'">' . __( 'About', 'buddypress' ) .'</a></li>';

    }

    add_action('bp_nav_items','add_about_to_main_menu');
    ?>

    Avatar of Jvinch
    jvinch
    Participant

    @jvinch

    Thanks, PerS -this was helpful for me as well.

    For those who are still confused – take the code, put it in a file (ie new-menu-items.php) and upload it to your “mu-plugins” directory. Works like a champ.

    Question for PerS or anyone else: what would the code look like if I wanted to insert a new menu item in another position than on the right?

    Ie. Home About News etc.

    And what would I need to remove a menu item from that menu bar, assuming I do not want to hack the theme files?

    Thanks in advance

    Avatar of Vito687
    vito687
    Participant

    @vito687

    THis worked great… but, the selected state shows as “Home” instead of the link I added? could you please help me with this?

    Fantastic.. Worked for me.. I was creating pages, and they were not showing up..

    All you have to do is copy the code, paste it in notepad or any editor, and change the word “about”.. To “whatever” page you created. I think there are six instances of name changing.. That’s what I did anyway.. Then I saved it how I wanted.. and adding .php at the end.. and uploaded it to the server, in the mu-plugins.. refreshed my page.. and voila.

    Avatar of Keyboardgeek
    keyboardgeek
    Member

    @keyboardgeek

    Works a treat, thanks PerS and jvinch :)

    Avatar of Life2000
    life2000
    Participant

    @life2000

    This little plugin seemed to work for me before, but now, it simply does not redirect the navigation button to a page, any page for that matter?

    It does add the navigation button to the menu bar very effectively though.

    How can I make sure it always sends the link to the right page?

    Thanks so much;

    Vida

    Avatar of Scotm
    Scotm
    Participant

    @scotm

    Has anyone figured out how to use this plugin to remove various nav items as well?

    The NAV items “home”, “members”, “blog”, “groups” and “blogs” are created in:

    wp-content/mu-plugins/bp-core/bp-core-templatetags.php

    around line 542

    I am having the same problem as life2000. I added the menu link “Directory”, added the “Directory” page in mu, but the page I created does not show up. It is pointing to the correct uri (blah.com/directory/) – but the “/directory” page just displays the same info as the home/index page.

    ^ sorry. figured out the problem.

    Avatar of Life2000
    life2000
    Participant

    @life2000

    Hi Dave:

    Would you share the solution?

    Thanks so much;

    Vida

    Avatar of Vito687
    vito687
    Participant

    @vito687

    Still having problem with “selected” class not working for links I add, any help would be appretiated

    Avatar of Plunderpat808
    plunderpat808
    Participant

    @plunderpat808

    This plugin was working for me for adding menu items with a working selected class, the problem I was having was that it corrupted my wordpress admin so that everytime I posted something I got a blank white screen. Does anybody know how to fix this? is it a permissions issue on the plugin file?

    Avatar of Ezd
    Ezd
    Participant

    @ezd

    Anyone figured out how this is done yet?

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘adding a page’ is closed to new replies.