Title: Single Record Shortcode
Last modified: January 15, 2019

---

# Single Record Shortcode

 *  [todaywithsam](https://wordpress.org/support/users/todaywithsam/)
 * (@todaywithsam)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/single-record-shortcode/)
 * Hello,
 * I am trying to embed the data from a single record into a page. I cannot seem
   to get a single record to work unless it is clicked from a list. We do not want
   to use the list feature.
 * example have the data from a record loaded into a tab that is on a page for say
   a vendor.
 * Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/single-record-shortcode/#post-11093826)
 * The single record shortcode needs to be told which record to show. The link from
   the list does this by including the ID of the record in the URL, but there are
   other ways to do this.
 * For example, if you wanted the shortcode to always show the same record, you 
   could use a shortcode like this:
 * [pdb_single record_id=123]
 * The would show record ID 123.
 * I don’t know what you have in mind here, but in most cases, you will be choosing
   which record to show with some php code. You’ll have to figure out how to do 
   that part, but the basic idea is your code includes the record ID in the shortcode
   and use the do_shortcode() function to invoke the shortcode. For a simple example:
 *     ```
       <?php
       $record = 123; // use your own code to assign the value here
   
       // this shows the record with the record id as assigned to the $record variable
       echo do_shortcode( '[pdb_single record_id=' . $record . ']' );
       ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Single Record Shortcode’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

## Tags

 * [single record](https://wordpress.org/support/topic-tag/single-record/)

 * 1 reply
 * 2 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/single-record-shortcode/#post-11093826)
 * Status: not resolved