you warped your code inside
if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
// code here
?php endif;
witch means that if you have any widgets on that sidebar the the code within the IF will not work. its basically using the code inside the if to use as default widgets and once you have a widget on the sidebar it ignores it.
so if your sidebar does have any widgets you need to run your is_user_logged_in function
inside a PHP capable widget.
hope this helps
Related Posts:
- Replacing the WordPress password validation
- WordPress auto login after registration not working
- dynamic_sidebar not rendering sidebar
- Add featured image to sidebar [closed]
- Show newly added posts since last user login time /date
- Get user info outside WordPress
- How can I secure a WordPress blog using OpenID from a single provider?
- How to exclude parent category but show child categories?
- Specific and Different Ads for each Post?
- Redirect after login based on user role (custom login page)
- Twenty Ten child theme has post on an inner page. Cant get that page to use my desired template
- Template part vs Sidebar (differences)
- Redirect User to Homepage if no other redirect is specified
- Change sidebar headers from H1?
- My custom page template with is_user_logged_in() does not detect that I’m logged in
- Share user table from WP with Drupal
- How can I allow password reset based on logins containing the @ character?
- How to delete wordpress menu
- CSS Twentyeleven / Sidebar has to be changed IN the CSS Stylesheet. Sidebar on the left side
- Redirecting or displaying a message on first login
- How can I allow access to multiple users, using the same login, at the same time?
- Detecting all admins that are logged in
- Why does the TwentyTen Theme sidebar have a class called ‘xoxo’?
- Dynamic Sidebar for subcategory of a category
- Redirect user to login before viewing custom post
- How to add a class when there’s no sidebar?
- Sidebar loop – Thematic Framework
- How to have dynamic sidebar content per post
- Should I encrypt the response that triggers an Ajax action? Is nonce sufficient?
- Sidebar on the wrong side of the page
- Logins from WP users table use on another page
- Use WordPress Login for a non-wordpress site
- author list not linking to correct page
- sidebar parameters (before_widget, before_title) not Working
- Keep Logged in Users out of Admin Panel
- Multi-site User Sessions
- Change CSS based on is_user_logged_in
- Sidebar widget not displaying after simple code update.
- Find out how many times the user has logged in
- Does wordpress support natively the concept of logging-in users? (not admins, but users of the website)
- Dynamic sidebar rendered in another place than i would like
- Display video on homepage for users who have not logged in
- Common side bar for multiple websites
- Cannot retrieve author in sidebar of single.php
- Echo Text If User Is Logged in But NOT the Author of post
- How do I show breadcrumbs when sidebar is not applied?
- How can i login with user’s password in WordPress being an admin?
- Sidebar only shows up on blog page
- Use members from 1 site on another one
- Find sidebar.php in WP 3.9.2
- Sidebar not appearing on page template with custom posts
- Can I edit the database to change a login?
- Can user meta be shown or hidden depending on user logged in status?
- get_posts() in secondary sidebar messes up content in primary sidebar
- how redirect users to custom login page when “login to reply” is clicked? [duplicate]
- Get specific sidebars $wp_registered_sidebars [closed]
- User(s) already exists show error please provide a valid username
- Function to add class to element?
- Is it ok to chop index.php and include files?
- WordPress – Allow dynamic text to be added into a sidebar upon page creation
- How do i replace the sidebar to use pages instead of blogs?
- Sidebar Stuck To First Post, Not Top Of Page
- Is there a way to display content from a post meta box in the sidebar?
- define two login page url
- Restrict users of site 1 to login in site 2 in wordpress multisite
- How to block specific user id in custom login form?
- How to connect wordpress user with my own APP user?
- Login issue with subdomain installs
- How to make sidebar float right and site content left
- How do I set is_active_sidebar?
- The WP home page corrupted after switching to new theme
- WP users cant reset password
- is_user_logged_in() not working in homepage
- How do I fully rid of the 1px wide sidebar border? [closed]
- how do i get my sidebar above content on nanomag theme
- Multisite – site user limited only for this site
- $user_login is not working if author has only 1 post
- Change Sidebar for rewritten page
- Specific Content on pages based on user
- Change page layout
- Need help with theme Business (Modern Themes): sidebar issue
- I’d like to add an fa icon before a link in my ‘recent post’ side bar [closed]
- Echo there are no posts wp_get_archives
- How to change templates based on URL
- is_home() and is_front_page() not working in sidebar
- Current User Seeing Another Logged In User Info
- Sidebar not visible after changing to new domain
- Resizing Picture
- Sidebar not displaying on custom-page.php
- Searchresult sidebar change
- How to hide a Sidebar from other admins?
- Differentiate Between Parent & Child Categories
- How to change font in title of sidebar widget [closed]
- Persistent sidebar.php [closed]
- Sidebar not appearing
- Woo commerce Single Product Sidebar [closed]
- user can login from single account detail from multiple locations(computer) at the same time [closed]
- sidebar choice not saved for pages (but saved ok for posts/custom posts) [closed]
- How to track all users logged into a site?
- Cant edit profile from frontend