• 0
Sign in to follow this  
Followers 0

How to display Side bars only if user is logged in ?

Question

Posted · Report post

Hi; Was wondering if there is a way to show/display a sidebar (in this case tertiary sidebar) only when user is logged in and hide if not. Also; how can i protect pages from public view if user if not logged.. i tried the wordpress (Private & password protected) but that just hides them for both logged in & out.. Thanks

Share this post


Link to post
Share on other sites

12 answers to this question

  • 0

Posted · Report post

You can activate Platform Base as your theme, copy template.content.php to the platformbase folder, and use `is_user_logged_in()` for the stuff you want to restrict: `<?php if( is_user_logged_in() ): ?>` `...` `...` `<?php endif; ?>`

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Tim, I am a bit of a novice user and not very good in php.. I am using Platfrom PRO theme and not sure whether your instructions above apply to Platform Base theme only. Appreciate your help. Thanks

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Muyassar, Basically you'll want to have both themes in your wp-content/themes folder. Then, in Appearance->Themes make sure that "Base" is the theme that is active. Then, simply follow Tim's instructions (above).

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Kate, Base is uploaded but i can not see it under appearance ? My site is almost finished, will i lose any settings if i re-upload and activate the base version ?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

When you go to Appearance > Themes do you see the theme PlatformBase? If it's not there, you should upload it and activate it and then make your changes there. The settings you used in PlatformPro shouldn't be affected, but you should back up those settings (and other changes) to be safe.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi, Please see below while trying to install platformbase Unpacking the package??¦ Installing the theme??¦ Destination folder already exists. /public_html/online/wp-content/themes/platformbase/ Theme install failed. Shall i delete the platform base folder and try again.. bearing in mind that I am trying to do this with out impacting the existing settings/plugins/pages/etc..?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Muyassar, Before reinstalling, would you please confirm that it's not appearing in Settings->Appearance->Themes? Are you able to send us a screenshot of that section, please?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Kate; I can confirm that i do not see platformbase under appearnce. However i have just noticed that at the bottom of the appearance page "Broken Themes The following themes are installed but incomplete. Themes must have a stylesheet and a template. Name Description PlatformBase The parent theme is missing. Please install the "platformpro" parent theme. Please see the links here for the screen shots Themeview View 2 CPanel view (Platform base)

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Try updating both your themes then, both PlatformPro and PlatformBase. Also, regarding the sidebar problem...you can use the Widget Logic plugin to help you do that in conjunction with the is_user_logged_in conditional

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Try updating both your themes then, both PlatformPro and PlatformBase.
What do you mean by updating... is that re-install ? and If i do this, will it affect my settings, pages, plugins, etc.. I have been working on this site for over 3 weeks now, its going live on Friday and last thing i want is to start from scratch.. Is there a way to update and correct the broken theme with minimal impact on my site. Appreciate your quick response..and thanks for your help cheers

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What do you mean by updating... is that re-install ?
If you have a previous version of Platform, you should try updating (the current version is 1.4). You will need to back up everything (your settings and other changes including custom CSS, base file customizations, plugins, etc.).

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi, I updated the theme and installed in a new folder as decribed in the documentation.. while the Pro is recognised and activated.. the platformbase fails to install and i still cannot see it under > Appearance. Never mind. I will just keep it as is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0