Help With 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/
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 WordPress
* @subpackage Twenty_Eleven
* @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‘;
}?>–><!–
<?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 (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
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!
- The topic ‘Help With Custom Post Template’ is closed to new replies.