Body: <p>Is there a way to hide a wordpress menu item based on custom fields in the civicrm contact record?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-10T15:41:20.947Z
Comments.Text: Wanna expand your question a little? A wordpress menu item would not normally be associated with a specific contact record. If you're auto-generating menu items from contact records, then that code might be able to include a class based on the value of a custom field, and then you could use some css or javascript.
Comments.UserDisplayName: Alan Dixon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-10T15:55:44.890Z
Comments.Text: Or are you hiding the menu item based on the custom field value of the logged in contact? A use-case description would help.
Comments.UserDisplayName: Alan Dixon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-10T23:01:13.417Z
Comments.Text: Of course. My idea was, based on the custom field value of a logged in contact to show or hide a menu item. 
  The reason behind this was wanting to provide menu items with links to surveys, that will disappear once completed. 
  
  I have decided to send contacts links to these instead, using the information here:
  https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails
Comments.UserDisplayName: Brad
Tags: <wordpress><custom-fields><menu>
Title: Hide wordpress menu items based on civicrm contact fields?
ThreadText: # Hide wordpress menu items based on civicrm contact fields?
  
  (Asked by: username_0 on 2019-12-09)
  
  Is there a way to hide a wordpress menu item based on custom fields in the civicrm contact record?
  
  **Tags:** wordpress, custom-fields, menu
  
  > **Comments:**
  > **username_1**: Wanna expand your question a little? A wordpress menu item would not normally be associated with a specific contact record. If you're auto-generating menu items from contact records, then that code might be able to include a class based on the value of a custom field, and then you could use some css or javascript.  
  > **username_1**: Or are you hiding the menu item based on the custom field value of the logged in contact? A use-case description would help.  
  > **username_0**: Of course. My idea was, based on the custom field value of a logged in contact to show or hide a menu item.  The reason behind this was wanting to provide menu items with links to surveys, that will disappear once completed.   I have decided to send contacts links to these instead, using the information here: https://aghstrategies.com/content/how-create-one-click-personalized-links-civicrm-emails  
  
  ---
  
  ## 0 answers
  
  