Title: Need basic help with PDbTemplate class
Last modified: August 21, 2016

---

# Need basic help with PDbTemplate class

 *  Resolved [bhavens](https://wordpress.org/support/users/bhavens/)
 * (@bhavens)
 * [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/)
 * I’m new to the whole php/css world (yeah, sorry) so I’m working my way through
   this. Love the plugin so far I just need some help going forward.
 * My Participants database has three “types” of participants: venues, troupes, 
   performers
 * – I created separate groups for the type-specific fields and a common group for
   the common fields.
    – My submission_type field captures the page slug of the 
   sign-on page used
 * I have three list pages that use the php_list shortcode using groups= and some
   filtering to get the results that I want.
 * ** All is working up to this point **
 * GOAL:
    On each list page I want to click a field (‘ld_name’ is a common field)
   and have it display a single record page…. with that single record only displaying
   the appropriate groups for its submission_type.
 * SO FAR:
    I created a copy of pdb-single-default.php and put it in the templates
   folder of my current WP template, renaming it pdb-single-performer.php.
 * I edited the exclude statement so that it excludes the venue and troupe fields.
 * Yay, all this works. For *performers*…
 * PDBTEMPLATE CLASS ISSUES:
    I assume the answer lies with the PDbTemplate class
   and using the Switch/Case structure (??) to set up each single record response
   the way I want it to display.
 * BUT… I ran into problems right away so I kept cutting my file down further and
   further.
 * At this point I have a VERY simple pdb-single-submission.php file in my templates
   folder only it isn’t returning anything.
 * I am VERY new to all of this, so I’m guessing I am missing something really basic.
 *     ```
       <?php
       /*
        * template for displaying a single record using IBinfo data
        *
        * single record template
        */
   
       // get the template object for this record
       $this_submission = new PDb_Template($this);
       ?>
   
       <h1>
         <?php $this_submission->print_field('ld_name') ?>
       </h1>
       ```
   
 * That’s the extent of my file…
 * I appreciate assistance.
 * [https://wordpress.org/plugins/participants-database/](https://wordpress.org/plugins/participants-database/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [bhavens](https://wordpress.org/support/users/bhavens/)
 * (@bhavens)
 * [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/#post-4955892)
 * oh, stupid, stupid… I didn’t realize that the theme I was using (which is on 
   white background for the record) has h1,h2,h3, etc. as WHITE. It was there all
   along but I wasn’t seeing it. Eesh.
 * I would love to hear feedback, however, on if the Switch/Case is the way to go
   with this.
 * Thanks!
 * B.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/#post-4955950)
 * I can’t really comment too specifically about your switch/case question…but I
   will say that if you want to catch several specific fields in the loop and modify
   them, using switch/case is a good choice.
 *  Thread Starter [bhavens](https://wordpress.org/support/users/bhavens/)
 * (@bhavens)
 * [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/#post-4955968)
 * The switch/case did work – a case for each type with the type-specific fields
   inside the case.
 * Now on to getting the graphic to display larger on the single record (but not
   in the lists)… I have it in an if statement so it only displays if it exists (
   stole that from somewhere here on the forum) but I can’t figure out what I need
   to do to make it display larger.
 * (This really is a terrific plug-in.)
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/#post-4956006)
 * To control the sizes of things on the page, you need to add some new CSS rules.
   The plugin does not have formatting settings built in, it’s designed to let the
   WP theme handle that. There is a convenient place to put your CSS that targets
   the plugin output in the settings, under the “custom CSS” tab.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Need basic help with PDbTemplate class’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/need-basic-help-with-pdbtemplate-class/#post-4956006)
 * Status: resolved