Support » Plugin: Login Logout Menu » Additional Menu Items

Viewing 9 replies - 1 through 9 (of 9 total)
  • I’m using another plugin in conjunction with this one. Peter’s 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



    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

    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


    Can you tell me more about this function ? Where does it come from ?

    Yes, it comes from:

    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:

    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’) . ‘‘ . $after;
    $link = ”;
    } else {
    $link = $before . ‘‘ . __(‘My Alpha and Omega’, ‘peterloginrd’) . ‘‘ . $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


    Ok i understand, you need a kind of “new” login and logout pages, custom one right ?


    Plugin Author Julio Potier


    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.

    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.