Answers.Body: <p>So I've done something similar (I used the group a user was a part of vs just a user) with a template 'extra' file that contained javescript and a quick call to the API. Not sure if this is the ideal method but it worked to show/hide some content.</p>
  
  <p><a href="https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates" rel="nofollow noreferrer">https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates</a></p>
  
  <p><a href="https://civicrm.stackexchange.com/questions/20744/javascript-contact-api-how-do-i-do-something-with-results">Javascript Contact API - how do I &#39;do something&#39; with results</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T12:35:08.727Z
Answers.LastActivityDate: 2018-03-14T12:35:08.727Z
Answers.UserDisplayName: RayWright
Body: <p>I am working on an event registration. We need to hide certain price set line items based on various factors. Most are based on previous field response but there is one line item that needs to be hidden if user is logged in. I found this post: <a href="https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery">https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery</a></p>
  
  <p>But can't seem to get it to work in my custom template. I probably have some syntax wrong.</p>
  
  <p>Any thoughts or a alternate solution would be appreciated.</p>
  
  <p>Thanks </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-14T01:14:08.087Z
Comments.Text: maybe worth looking at how folk are doing the 'show line items to limited users, eg folk in a group' and then reverse engineer? There was a question / answer about the latter quite recently that pointed to an Extension I had not heard of previously - https://github.com/tadpolecc/civicrm_groupprice
Comments.UserDisplayName: petednz - fuzion
Tags: <wordpress><civievent><custom-templates>
Title: Hide Line items if user is logged in
ThreadText: # Hide Line items if user is logged in
  
  (Asked by: username_0 on 2018-03-13)
  
  I am working on an event registration. We need to hide certain price set line items based on various factors. Most are based on previous field response but there is one line item that needs to be hidden if user is logged in. I found this post: <https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery>
  
  But can't seem to get it to work in my custom template. I probably have some syntax wrong.
  
  Any thoughts or a alternate solution would be appreciated.
  
  Thanks
  
  **Tags:** wordpress, civievent, custom-templates
  
  > **Comments:**
  > **username_1**: maybe worth looking at how folk are doing the 'show line items to limited users, eg folk in a group' and then reverse engineer? There was a question / answer about the latter quite recently that pointed to an Extension I had not heard of previously - https://github.com/tadpolecc/civicrm_groupprice  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-03-14. Score: 1
  
  So I've done something similar (I used the group a user was a part of vs just a user) with a template 'extra' file that contained javescript and a quick call to the API. Not sure if this is the ideal method but it worked to show/hide some content.
  
  <https://civicrm.org/blog/dave-greenberg/now-its-easier-add-custom-behaviors-templates>
  
  [Javascript Contact API - how do I 'do something' with results](https://civicrm.stackexchange.com/questions/20744/javascript-contact-api-how-do-i-do-something-with-results)
  
  
  ---
  
  