Answers.Body: <p>What other field types have you added to the profile? Can you add a screen shot of the fields you have included? If you have allowed access on the front end to the contact dashboard, you can include expiration date there, without having a separate profile.</p>
  
  <p><a href="https://i.sstatic.net/yqTzd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yqTzd.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-11T17:30:49.123Z
Answers.LastActivityDate: 2016-02-11T17:30:49.123Z
Answers.UserDisplayName: Barbara Forbes-Lyons
Answers.Body: <p>Why not just use the User Dashboard and select which elements you want to show?</p>
  
  <p>From the online CiviCRM Book:</p>
  
  <p>When selecting the User Dashboard you get no additional options. To identify what related information you have setup to be displayed within the user dashboard i.e. Contributions, memberships, etc. <strong>navigate to Administer > Customize Data and Screens > Display Preferences and select all of the information you would like to have visible to the user.</strong></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-10T15:00:27.660Z
Answers.LastActivityDate: 2016-05-10T15:00:27.660Z
Answers.UserDisplayName: HPCiviCRM
Answers.Body: <p>If you want to fetch this information directly, the following code should get you started. It displays the logged-in user's membership expiry date:</p>
  
  <pre><code>// get current WP user
  $user = wp_get_current_user();
  
  if ( civi_wp()-&gt;initialize() ) {
  
      // get contact ID
      require_once 'CRM/Core/BAO/UFMatch.php';
      $civi_contact_id = CRM_Core_BAO_UFMatch::getContactId( $user-&gt;ID );
  
      // get CiviCRM membership details
      $memberships = civicrm_api( 'Membership', 'get', array(
          'version' =&gt; '3',
          'page' =&gt; 'CiviCRM',
          'q' =&gt; 'civicrm/ajax/rest',
          'sequential' =&gt; '1',
          'contact_id' =&gt; $civi_contact_id,
      ));
  
      // show expiry date
      echo $memberships['values'][0]['end_date'];
  
  }
  </code></pre>
  
  <p>Obviously your production code would include error checks after fetching the CiviCRM Contact ID and the Memberships that they may or may not hold. It would also convert the date to a more friendly format.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-12T11:36:41.463Z
Answers.LastActivityDate: 2016-02-12T11:36:41.463Z
Answers.UserDisplayName: Christian Wach
Body: <p>I want to let members see their membership expiry date. I am running Civi 4.6 with Wordpress 4.4.1. I have tried creating a Membership Details profile with one field "Membership Expiration Date" in it, but whenever I try and view the field, I get "Profile search, view and edit are not supported for Profiles which include fields for more than one record type."</p>
  
Tags: <wordpress><civimember><profile>
Title: How do I add a Membership Expiry view-only field to a user profile page in Wordpress?
ThreadText: # How do I add a Membership Expiry view-only field to a user profile page in Wordpress?
  
  (Asked by: username_0 on 2016-01-16)
  
  I want to let members see their membership expiry date. I am running Civi 4.6 with Wordpress 4.4.1. I have tried creating a Membership Details profile with one field "Membership Expiration Date" in it, but whenever I try and view the field, I get "Profile search, view and edit are not supported for Profiles which include fields for more than one record type."
  
  **Tags:** wordpress, civimember, profile
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2016-02-12. Score: 3 | Accepted answer
  
  If you want to fetch this information directly, the following code should get you started. It displays the logged-in user's membership expiry date:
  // get current WP user
  $user = wp_get_current_user();
  
  if ( civi_wp()->initialize() ) {
  
      // get contact ID
      require_once 'CRM/Core/BAO/UFMatch.php';
      $civi_contact_id = CRM_Core_BAO_UFMatch::getContactId( $user->ID );
  
      // get CiviCRM membership details
      $memberships = civicrm_api( 'Membership', 'get', array(
          'version' => '3',
          'page' => 'CiviCRM',
          'q' => 'civicrm/ajax/rest',
          'sequential' => '1',
          'contact_id' => $civi_contact_id,
      ));
  
      // show expiry date
      echo $memberships['values'][0]['end_date'];
  
  }
  
  Obviously your production code would include error checks after fetching the CiviCRM Contact ID and the Memberships that they may or may not hold. It would also convert the date to a more friendly format.
  
  
  ---
  
  ### Answer by username_1 on 2016-02-11. Score: 1
  
  What other field types have you added to the profile? Can you add a screen shot of the fields you have included? If you have allowed access on the front end to the contact dashboard, you can include expiration date there, without having a separate profile.
  
  [![enter image description here](https://i.sstatic.net/yqTzd.png)](https://i.sstatic.net/yqTzd.png)
  
  
  ---
  
  ### Answer by username_2 on 2016-05-10. Score: 0
  
  Why not just use the User Dashboard and select which elements you want to show?
  
  From the online CiviCRM Book:
  
  When selecting the User Dashboard you get no additional options. To identify what related information you have setup to be displayed within the user dashboard i.e. Contributions, memberships, etc. **navigate to Administer > Customize Data and Screens > Display Preferences and select all of the information you would like to have visible to the user.**
  
  
  ---
  
  