Jump to content


Photo
- - - - -

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


  • Please log in to reply
12 replies to this topic

#1 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 06 June 2011 - 11:24 PM

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

#2 timlinson

timlinson

    Advocate

  • Members
  • PipPipPipPipPip
  • 1032 posts

Posted 07 June 2011 - 03:50 AM

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: `` `...` `...` ``

#3 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 07 June 2011 - 10:42 AM

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

#4 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 07 June 2011 - 01:15 PM

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).

#5 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 07 June 2011 - 09:09 PM

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 ?

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 08 June 2011 - 02:27 AM

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.

#7 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 08 June 2011 - 10:30 AM

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..?

#8 Kate

Kate

    Advocate

  • Members
  • 3039 posts

Posted 08 June 2011 - 02:34 PM

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?

#9 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 08 June 2011 - 03:18 PM

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

Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content



#10 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 08 June 2011 - 07:06 PM

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

#11 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 08 June 2011 - 07:23 PM

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

#12 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 09 June 2011 - 02:21 AM

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.).

#13 montanauk

montanauk

    Member

  • Members

  • 24 posts
  • Country: Country Flag

Posted 09 June 2011 - 03:50 PM

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.