Screenshot of BuddyBoss Groups


Our Requirements for a CPT

For the ESRM project, we collect soil samples which are then tested for the presence of certain bacterial strains. We need to take data for several stages of this process, including the stage of soil collection, soil testing, the final results of bacterial growth, and then possibly further data analysis if the bacteria we found is of particular interest. The same data is collected by every student researcher in our study. This type of study is well-suited for using a CMS for data collection since the CPT is the same for each student researcher. The fields that we need to contain in our CPT are the following.

  • 16S rDNA File [File] - Optional file that explains the 16S rDNA structure
  • Cataloged [Boolean] - Whether the soil sample was cataloged to an outside registry like
  • Comments for Docs and Images [Formatted Text] - Optional descriptions for any docs or images that were uploaded
  • Researcher Name [Text] -
  • Course Semester [List(Text)] - Semester in which the soil sample was collected
  • Course Year [Text List] - Year in which the soil sample was collected
  • Degradation Kinetics [File] - Optional file that explains the degradation kinetics
  • Genomic Biomarkers [Website Link] -
  • Soil Sample Description [Formatted Text] - A brief description of the soil sample
  • Soil Sample Collection Date [Date] - The date on which the soil sample was collected
  • Location Name [Text] - A descriptive name of where the soil sample was collected
  • Location Street [Text] - Street address where the sample was collected
  • Location City [Text] - City where the sample was collected
  • Location County [Text] - County where the sample was collected
  • Location State [Text] - State where the sample was collected
  • Location Country [Text] - Country where the sample was collected
  • Location Postal Code [Text] - Postal Code/ZIP where the sample was collected
  • Lab Section [List(Text)] - In our case, this is a list of days (Sunday through Saturday)
  • Organization [List(Text)] - List of educational institutions involved in our study
  • Colony Count of Methyl Parathion [Integer] - An estimated count of the number of colonies of Methyl Parathion that grew from the prepared soil sample
  • Colony Count of Paraoxon [Integer] - An estimated count of the number of colonies of Paraoxon that grew from the prepared soil sample
  • Research ID [Text] - An ID that is used to uniquely identify each soil sample
  • Soil Sample Taxonomy [List(Text)] -
  • Soil Sample Classification [List(Text)] -
  • Target Molecure Links [Website Link] -
  • Title [Text] -
  • [] -
Use of Other Resources

For the overall structure of our CPT plugin, we followed the best practices of the Boilerplate plugin. However, we did not use much of the code in the Boilerplate, because we are developing a CPT in particular.

For the CPT code, we utilizes the resources from the repository of the WordPress Plugin Development Cookbook, chapter 4. That chapter explains development of a Custom Post Type, in this case for a Book Review. the final development is in the 9th iteration of the CPT . For our soil sample, we refactored this file into a separate file to contain the definition and actions of the CPT in soil_sample_actions.php.

The final structure that we have for the soil sample CPT...

Valuable Resources

  • WordPress Plugin Development Cookbook (3rd Edition) - This book contains recipes for different aspects of creating WordPress plugins. There is also an associated GitHub repository for the code.