Title: Help With Custom Post Template
Last modified: August 21, 2016

---

# Help With Custom Post Template

 *  Resolved [FuryFC](https://wordpress.org/support/users/furyfc/)
 * (@furyfc)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/)
 * I’m new to this. I successfully made a custom post type with this plug-in, and
   imported a spreadsheet of 23 soccer players, with 32 columns of stats, urls, 
   bio text, etc.
 * I’m now trying to display the data and to create a custom post template.
 * Only the header and the post_title and post_content seem to be showing. I have
   a template in a .php file, but must not be calling it correctly.
 * I do notice my regular posts now have a custom post template box on the sidebar(
   although the edit window says no templates are associated). My custom posts have
   no such option.
 * My site is [http://www.furyfc.com/blog/](http://www.furyfc.com/blog/)
 * the custom post type is furyplayers
 * the “template” is single-furyplayers.php. It’s code is:
 * <?php
    /** * The Template for displaying all single furyplayer posts. * * [@package](https://wordpress.org/support/users/package/)
   WordPress * @subpackage Twenty_Eleven * [@since](https://wordpress.org/support/users/since/)
   Twenty Eleven 1.0 */
 * get_header(); ?>
 *  <div id=”primary”>
    <div id=”content” role=”main”>
 *  <?php while ( have_posts() ) : the_post(); ?>
 *  <nav id=”nav-single”>
    <h3 class=”assistive-text”><?php _e( ‘Post navigation’,‘
   twentyeleven’ ); ?></h3> <span class=”nav-previous”> <?php $back =$_SERVER[‘HTTP_REFERER’];
   if( isset( $back ) && $back != ” ) { echo ‘[<span class=”meta-nav”>←</span>Return to roster](https://wordpress.org/support/topic/help-wit-custom-post-template/&apos; . $back . &apos;?output_format=md)‘;}?
   >–>
 *  <!–
    <?php previous_post_link( ‘%link’, __( ‘<span class=”meta-nav”>←</span>
   Previous’, ‘twentyeleven’ ) ); ?></span>
 *  <span class=”nav-next”><?php next_post_link( ‘%link’, __( ‘Next <span class=”
   meta-nav”>→</span>’, ‘twentyeleven’ ) ); ?></span>
    –> </nav><!– #nav-single –
   >
 *  <?php get_template_part( ‘content’, ‘single-furyplayer’ ); ?>
 *  <?php endwhile; // end of the loop. ?>
 *  </div><!– #content –>
 *  </div><!– #primary –>
 * <?php get_footer(); ?>
 * I also have a file named content-single-furyplayers.php that includes the data
   get and put commands, as well as a lot of html code and echo statements to populate
   a 32-field table I’m trying to populate with the data.
 * Any help would be appreciated. My concept is similar to this: [http://www.youtube.com/watch?v=w9wutxk7zi0](http://www.youtube.com/watch?v=w9wutxk7zi0)(
   by the way, I can’t find that plug-in), but with the data going into an html-
   created table-based format.
 * I’m trying to make it look like this:
 * [http://furyfc.com/blog/wp-content/uploads/2013/09/template_layout.jpg](http://furyfc.com/blog/wp-content/uploads/2013/09/template_layout.jpg)
 * I’m excited that, with this plug-in, I was able to import all of my csv for each
   player to custom posts. Now I just need to show the data.
 * I’d settle for showing the data in any format for now, and then worrying about
   getting the format more refined.
 * I suspect my mistake is a typo or something stupid I’m just not recognizing. 
   Unfortunately, since I’m new to this, it’s like I’m working in my non-native 
   language.
 * Help please! Anybody!
 * [http://wordpress.org/plugins/custom-post-type-ui/](http://wordpress.org/plugins/custom-post-type-ui/)

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

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/#post-4107825)
 * The issue isn’t really our CPT UI plugin, as it registered the post type for 
   you and has done its job. You were able to then import your data and map it to
   the registered custom post type. The only issue now is querying for that in the
   database and displaying it. You have the single post view files correct from 
   what i can tell. The naming convention for those is single-{cpt_slug}.php. The
   other one you’d want for a listing of them, is archive-{cpt_slug}.php
 * Sadly, I don’t know where the importing mapped everything. I assume a lot of 
   post meta. So that part is kind of up to you at the moment.
 *  Thread Starter [FuryFC](https://wordpress.org/support/users/furyfc/)
 * (@furyfc)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/#post-4107872)
 * You are correct that the data was imported into custom fields (i.e., post meta),
   so the plug-in works, and I’m very grateful for that.
 * To show the data on my page (for my example, I’ll use a custom field named “birthplace”),
   shouldn’t content-single-furyplayer.php say the following?:
 * <?php
    /** *This php sends the content to the single-furyplayer template * *@package
   WordPress *@subpackage Twenty_Eleven *@since Twenty Eleven 1.0 */ ?>
 * <article id=”post-<?php the_ID(); ?>”<?php post_class(); ?>>
 * <?php
 *  echo get_post_meta($post_id, ‘position’, true);
    ?>
 * </article>
 * That’s what I have, but the resulting post is only showing the post title and
   the post_content, not the value of the ‘position’ key.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/#post-4107905)
 * if the custom field key is “birthplace” then that’s what you’ll want to pass 
   in in place of “position” in your get_post_meta() call. Also, just because I’m
   not always sure, I’d confirm that $post_id has the right value as well.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/#post-4108007)
 * Any changes with this?

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

The topic ‘Help With Custom Post Template’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/help-wit-custom-post-template/#post-4108007)
 * Status: resolved