Title: Recker's Replies | WordPress.org

---

# Recker

  [  ](https://wordpress.org/support/users/recker/)

 *   [Profile](https://wordpress.org/support/users/recker/)
 *   [Topics Started](https://wordpress.org/support/users/recker/topics/)
 *   [Replies Created](https://wordpress.org/support/users/recker/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/recker/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/recker/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/recker/engagements/)
 *   [Favorites](https://wordpress.org/support/users/recker/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Showing/Changing Menu Items with Login/Logout](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/#post-4192867)
 * No, i’m wrong again! The cache hadn’t cleared and it was still showing an old
   link to account via role redirect.
 * Still haven’t managed to get it into a menu!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Showing/Changing Menu Items with Login/Logout](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/#post-4192866)
 * I’ve managed to get it partly working!: protipsters.co.uk
 * This is the code I’m using:
 *     ```
       /*Add Modal Menu Login/Logout*/
       function add_login_out_item_to_menu( $items, $args ){
   
       	//change theme location with your theme location name
       	if( is_admin() ||  $args->theme_location != 'primary' )
       		return $items; 
   
       		if( is_user_logged_in( ) )
           $link = '<a href="protipsters.co.uk/account" class="login">Account</a>';
       else
           $link = '<a href="protipsters.co.uk/subscription" class="login">Subscribe Now</a>';
   
       	$redirect = ( is_home() ) ? false : get_permalink();
       	if( is_user_logged_in( ) )
       		$link = do_shortcode('[modal_login login_text="Members Login" logout_text="Logout" logout_url="/"]');
       	else  $link = do_shortcode('[modal_login login_text="Members Login" logout_text="Logout" logout_url="/"]');
   
       	return $items.= '<li id="log-in-out-link" class="menu-item menu-type-link">'. $link . '</li>';
       }add_filter( 'wp_nav_menu_items', 'add_login_out_item_to_menu', 50, 2 );
       ```
   
 * The issue I’m having now is that the Subscribe Now/Account button is stuck on
   Account all the time. It doesn’t change name, but it does appear to do what it’s
   meant to do!
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Showing/Changing Menu Items with Login/Logout](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/#post-4192787)
 * Where would a javascript error log be found?
    And I need the modal login/logout
   connected to the main menu. And it would be useful to have this to!
 * Since I’m basically repeating code with a different layout, I don’t need this
   part again do i?
 *     ```
       function add_login_out_item_to_menu( $items, $args ){
   
       	//change theme location with your them location name
       	if( is_admin() ||  $args->theme_location != 'primary' )
       		return $items;
       ```
   
 * Thanks for the help!
    – Jamie
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Showing/Changing Menu Items with Login/Logout](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/showingchanging-menu-items-with-loginlogout/#post-4192756)
 * I tried that, It just showed a black screen! Didn’t load any of the site.
    Though
   it didn’t show any error code either, So It must be in the right direction!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Modal Login] i made something to use in the menu bar](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/)
 *  [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/#post-4133968)
 * What do I need to do if I want to keep the login_text/logout_text?
    I need to
   changing the word just like the function you provided, but just linking to other
   pages rather than the shortcode.
 * Sorry, I’m new to this 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Modal Login] i made something to use in the menu bar](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/)
 *  [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/#post-4133965)
 * So that part of the code would simply be:
 *     ```
       $link = http://www.mysite.com logout_url="/"]');
       else  $link = http://www.mysite.com logout_text="Uitloggen" logout_url="/"]');
       ```
   
 * _[Moderator Note: Please post code & markup between backticks or use the code
   button. Your posted code may now have been permanently damaged by the forum’s
   parser.]_
 * Is that correct?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Modal Login] i made something to use in the menu bar](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/)
 *  [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/i-made-something-to-use-in-the-menu-bar/#post-4133961)
 * Hey,
    Thank you that worked perfectly!
 * I was wondering if by any chance you knew how to tweak the code to do this:
 * If not logged in show ‘Link A’
    When logged in show ‘link B’ in place,
 * but rather then calling a shortcode it would be a page link.
 * I tried it myself but I caused my entire site to error and break.
    So I thought
   I’d ask you!
 * regards,
    Jamie
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Creating full page view for in Single Post mode](https://wordpress.org/support/topic/creating-full-page-view-for-in-single-post-mode/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/creating-full-page-view-for-in-single-post-mode/#post-1864539)
 * What code am I looking for? This theme is coded much differently to others I 
   have seen, I find navigating through it quite confusing!
 * I’ll link each below to save time!
 * **Header.php**
    _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com)]_
 * Footer.php only had something to do with bottom widget which doesn’t affect what
   I need.
    I hope you make more sense of it than I do, as most of it means nothing
   to me!
 * Thanks again in advance!
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Creating full page view for in Single Post mode](https://wordpress.org/support/topic/creating-full-page-view-for-in-single-post-mode/)
 *  Thread Starter [Recker](https://wordpress.org/support/users/recker/)
 * (@recker)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/creating-full-page-view-for-in-single-post-mode/#post-1864525)
 * My single.php contains:
 *     ```
       <?php
       	get_header();
       	include(THEME_LIB.'/template_posts.php');
       	get_footer();
       ?>
       ```
   
 * So, I’m guessing everything I need to chance would be in the template_posts.php?
 * I’m new to recoding of bits like this, so sorry in advance if I’m slow!

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