Skip to content

Instantly share code, notes, and snippets.

@xnau
Last active March 2, 2018 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xnau/49285e4a358b3086d6b0933718800d53 to your computer and use it in GitHub Desktop.
Save xnau/49285e4a358b3086d6b0933718800d53 to your computer and use it in GitHub Desktop.
<?php
/*
*
* template for participants list single record output
*
* use this template with a shortcode like this: [pdb_list template=single]
* if you want to show the search control, use this:
* [pdb_list search=true template=single]
*
*/
$id = is_array( $this->records ) ? key($this->records) : 0;
?>
<div class="wrap <?php echo $this->wrap_class ?>">
<a name="<?php echo $this->list_anchor ?>" id="<?php echo $this->list_anchor ?>"></a>
<?php $this->show_search_sort_form() ?>
<!-- showing record ID <?php echo $id ?> -->
<div class="list-container" >
<?php if ( $id ) : ?>
<?php echo do_shortcode( '[pdb_single id=' . $id . ']' ); ?>
<?php elseif ( $this->is_search_result ) : ?>
<h4><?php echo Participants_Db::$plugin_options['no_records_message'] ?></h4>
<?php endif ?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment