Title: Additional Menu Items
Last modified: August 20, 2016

---

# Additional Menu Items

 *  [TF28](https://wordpress.org/support/users/tf28/)
 * (@tf28)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/)
 * Hi There,
 * First thanks for the great plugin! I would suggest to add all the buddypress 
   menu items or give the chance to add menu item with my own php code myself.
 * Cheers, TF
 * [http://wordpress.org/extend/plugins/baw-login-logout-menu/](http://wordpress.org/extend/plugins/baw-login-logout-menu/)

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

 *  [peripatew](https://wordpress.org/support/users/peripatew/)
 * (@peripatew)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357309)
 * I’m using another plugin in conjunction with this one. Peter’s Login Redirect:
   [http://wordpress.org/extend/plugins/peters-login-redirect/](http://wordpress.org/extend/plugins/peters-login-redirect/)
 * In his notes section of the plugin, he mentions a “login portal” function of 
   the plugin. I know the php required to call that, but can’t add it in as a menu
   item like this plugin does.
 * Could there be a way to add in custom PHP options that get pulled in as menu 
   items like you have done?
 *  Plugin Author [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357310)
 * Hello
 * you both want to add your own menu item coded with php ?
    Explain me your need,
   why coded in php and not hardcoded/added in custom menu ?
 * Thank you
 *  [peripatew](https://wordpress.org/support/users/peripatew/)
 * (@peripatew)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357311)
 * I’m using the plugin mentioned above. I need to insert this:
 * `<?php rul_register(); ?>
 * in as a menu item so that it will call that on click. I searched and couldn’t
   find a way to have it do such. Perhaps there is an easier way to accomplish a
   similar thing? Sorry for my lack of coding knowledge.
 *  Plugin Author [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357312)
 * Can you tell me more about this function ? Where does it come from ?
 *  [peripatew](https://wordpress.org/support/users/peripatew/)
 * (@peripatew)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357313)
 * Yes, it comes from: [http://wordpress.org/extend/plugins/peters-login-redirect/](http://wordpress.org/extend/plugins/peters-login-redirect/)
 * Here’s the relavent bit from the plugin page:
 * > Custom “My Portal” link
   >  A common need is to display the “redirect” link for
   > a user in the site navigation or sidebar.
   > Look at the function rul_register() in the plugin file for inspiration; it 
   > makes use of the redirect_to_front_page() function to determine the URL and
   > then provides the relevant output code.
   > For a deeper dive into this feature, please see this video: [http://www.screenr.com/Gqi8](http://www.screenr.com/Gqi8)
 * Basically, I’m trying to create a link, which will use Peter’s Login Redirect
   plugin to send user’s to specific pages. I need them to click on a link in the
   menu though, which then call’s the function in his plugin. Here’s the function
   from the plugin:
 * > function rul_register( $before = ”, $after = ”, $give_echo = true ) {
   >  global
   > $current_user;
   >  if ( ! is_user_logged_in() ) {
   >  if ( get_option(‘users_can_register’) ) $link
   > = $before . ‘[‘ . __(‘Register’, ‘peterloginrd’) . ‘](https://wordpress.org/support/topic/additional-menu-items/&apos; . site_url(&apos;wp-login.php?action=register&apos;, &apos;login&apos;) . &apos;)‘.
   > $after; else $link = ”; } else { $link = $before . ‘[‘ . __(‘My Alpha and Omega’, ‘peterloginrd’) . ‘](https://wordpress.org/support/topic/additional-menu-items/&apos; . redirect_to_front_page(&apos;&apos;, &apos;&apos;, $current_user) . &apos;?output_format=md)‘.
   > $after;; }
   >  if ($give_echo) {
   >  echo $link; } else { return $link; } }
 * I tried modifying your plugin, and was successful in adding in a #bawcustomp#,
   but his plugin adds additional formatting the breaks the menu’s hyperlink.
 *  Plugin Author [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357314)
 * Ok i understand, you need a kind of “new” login and logout pages, custom one 
   right ?
 *  [peripatew](https://wordpress.org/support/users/peripatew/)
 * (@peripatew)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357315)
 * Yes!
 *  Plugin Author [Julio Potier](https://wordpress.org/support/users/juliobox/)
 * (@juliobox)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357316)
 * Ok ok, so you have to clone my plugin OR i can add a filter on each link then
   you could just hook on it.
 *  [peripatew](https://wordpress.org/support/users/peripatew/)
 * (@peripatew)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357317)
 * A filter would be a great solution, would I just add in my code somewhere?

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

The topic ‘Additional Menu Items’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/baw-login-logout-menu_cfcfdd.svg)
 * [Login Logout Menu](https://wordpress.org/plugins/baw-login-logout-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/baw-login-logout-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/baw-login-logout-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/baw-login-logout-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/baw-login-logout-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/baw-login-logout-menu/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [peripatew](https://wordpress.org/support/users/peripatew/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/additional-menu-items/#post-3357317)
 * Status: not resolved