Title: Create custom single.php file
Last modified: August 22, 2016

---

# Create custom single.php file

 *  [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/)
 * Hi. I created my website [http://www.ifixlv.com](http://www.ifixlv.com) with 
   Customizr theme. Now I found out that i have many errors in Google Webmaster 
   tool – structured data – hentry. In order to fix that I need to modify single.
   php file which my current theme do not have.
 * So I have a question, can I create a single.php file for current theme? If yes,
   how to do it?
 * Is there another version of Customizr that already contains the single.php file?
 * PLEASE HELP. REALLY NEED TO FIX THIS.

Viewing 15 replies - 1 through 15 (of 32 total)

1 [2](https://wordpress.org/support/topic/create-custom-singlephp-file/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/create-custom-singlephp-file/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/create-custom-singlephp-file/page/2/?output_format=md)

 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200493)
 * The default single.php looks something like this.
 *     ```
       <?php
       /**
        * The Template for displaying all single posts
        *
        * @package WordPress
        * @subpackage Twenty_Fourteen
        * @since Twenty Fourteen 1.0
        */
   
       get_header(); ?>
   
       	<div id="primary" class="content-area">
       		<div id="content" class="site-content" role="main">
       			<?php
       				// Start the Loop.
       				while ( have_posts() ) : the_post();
   
       					/*
       					 * Include the post format-specific template for the content. If you want to
       					 * use this in a child theme, then include a file called called content-___.php
       					 * (where ___ is the post format) and that will be used instead.
       					 */
       					get_template_part( 'content', get_post_format() );
   
       					// Previous/next post navigation.
       					twentyfourteen_post_nav();
   
       					// If comments are open or we have at least one comment, load up the comment template.
       					if ( comments_open() || get_comments_number() ) {
       						comments_template();
       					}
       				endwhile;
       			?>
       		</div><!-- #content -->
       	</div><!-- #primary -->
   
       <?php
       get_sidebar( 'content' );
       get_sidebar();
       get_footer();
       ```
   
 * You may want to create a child theme for your current theme and add the single.
   php to that.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200513)
 * Thank you for the quick reply. If I include this single.php file to my Customizr
   theme, will it effect my website look?
 * I found this article, how to fix my structured data problem. [http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings](http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings)
   
   But I couldn’t find these codexes in Customizr theme:
 * <span class=”post_date”><?php the_time(‘j F,Y’); ?></span>
    <span class=”theauthor”
   ><?php the_author_posts_link(); ?></span>
 * There is no single.php file and my index.php looks like this:
 * <?php
    /** * The main template file. Includes the loop. * * * [@package](https://wordpress.org/support/users/package/)
   Customizr * [@since](https://wordpress.org/support/users/since/) Customizr 1.0*/?
   > <?php do_action( ‘__before_main_wrapper’ ); ##hook of the header with get_header?
   > <div id=”main-wrapper” class=”<?php echo tc__f( ‘tc_main_wrapper_classes’ ,‘
   container’ ) ?>”>
 *  <?php do_action( ‘__before_main_container’ ); ##hook of the featured page (priority
   10) and breadcrumb (priority 20)…and whatever you need! ?>
 *  <div class=”container” role=”main”>
    <div class=”<?php echo tc__f( ‘tc_column_content_wrapper_classes’,‘
   row column-content-wrapper’ ) ?>”>
 *  <?php do_action( ‘__before_article_container’); ##hook of left sidebar?>
 *  <div id=”content” class=”<?php echo tc__f( ‘__screen_layout’ , tc__f ( ‘__ID’),‘
   class’ ) ?> article-container”>
 *  <?php do_action (‘__before_loop’);##hooks the header of the list of post : archive,
   search… ?>
 *  <?php if ( tc__f(‘__is_no_results’) || is_404() ) : ##no search results or 404
   cases ?>
 *  <article <?php tc__f(‘__article_selectors’) ?>>
    <?php do_action( ‘__loop’ );?
   > </article>
 *  <?php endif; ?>
 *  <?php if ( have_posts() && !is_404() ) : ?>
    <?php while ( have_posts() ) : ##
   all other cases for single and lists: post, custom post type, page, archives,
   search, 404 ?> <?php the_post(); ?>
 *  <?php do_action (‘__before_article’) ?>
    <article <?php tc__f(‘__article_selectors’)?
   >> <?php do_action( ‘__loop’ ); ?> </article> <?php do_action (‘__after_article’)?
   >
 *  <?php endwhile; ?>
 *  <?php endif; ##end if have posts ?>
 *  <?php do_action (‘__after_loop’);##hook of the comments and the posts navigation
   with priorities 10 and 20 ?>
 *  </div><!–.article-container –>
 *  <?php do_action( ‘__after_article_container’); ##hook of left sidebar ?>
 *  </div><!–.row –>
    </div><!– .container role: main –>
 *  <?php do_action( ‘__after_main_container’ ); ?>
 * </div><!–#main-wrapper”–>
 * <?php do_action( ‘__after_main_wrapper’ );##hook of the footer with get_get_footer?
   >
 * ANY IDEA WHERE CAN I FIND THESE CODEX IN CUSTOMIZR THEME?
 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200516)
 * I am don’t know the theme so well but it should have a single.php in it.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200521)
 * That is my problem. If it would have a single.php I could modify it. But it does
   not. Do you know where else I can try to find the codex I need to modify?
 * Here is the list of files from my current theme:
 * Templates
 *  Comments
    (comments.php) Custom Page Example Page Template (custom-page.php)
   Footer (footer.php) Theme Functions (functions.php) Header (header.php) class-
   fire-init.php class-fire-resources.php class-fire-utils.php class-fire-widgets.
   php Main Index Template (inc/index.php) init.php Main Index Template (index.php)
   sidebar-left.php sidebar-right.php
 * Styles
 *  Stylesheet
    (style.css)
 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200523)
 * The index.php or the custom-page.php maybe.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200524)
 * Look, the single.php template you sent me also does not have these codex:
 * <span class=”post_date”><?php the_time(‘j F,Y’); ?></span>
    <span class=”theauthor”
   ><?php the_author_posts_link(); ?></span>
 * **What should I do?**
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200525)
 * I checked both index.php (also I sent it to you earlier) and the custom-page.
   php there is no these codex
 * <span class=”post_date”><?php the_time(‘j F,Y’); ?></span>
    <span class=”theauthor”
   ><?php the_author_posts_link(); ?></span>
 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200526)
 * The theme author would be the best person to answer this.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200535)
 * How can I reach the theme author? I went to the theme website but it gives me
   error when trying to connect to support forum.
 * Is there anyone here, who can help me?
 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200537)
 * The theme author should respond to this support topic soon (that is if he is 
   a good author).
 * You also may find something one his website.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200548)
 * Ok. Thank you Matthew. Ill wait for the author respond
 *  [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * (@electricfeet)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200695)
 * I’m not the author, but I will try to help.
 * First off, when you post code, post it in backticks (or use the “code” button).
   Otherwise you risk breaking this site.
 * > Now I found out that i have many errors in Google Webmaster tool – structured
   > data – hentry.
 * What precisely are the errors?
 * > In order to fix that I need to modify single.php file which my current theme
   > do not have.
 * Why do you think this is the solution?
 * > So I have a question, can I create a single.php file for current theme?
 * It’s not likely to help, no.
 * > Is there another version of Customizr that already contains the single.php 
   > file?
 * No.
 * We need to know what errors you have in order to resolve them.
 *  Thread Starter [ifixlv](https://wordpress.org/support/users/ifixlv/)
 * (@ifixlv)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200747)
 * Ok. Thank you for agreeing to help.
 * 1. I have these errors in Google Webmaster – Structured data – hentry: missing
   author, missing update
 * 2. I found this article, how to fix my structured data problem. [http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings](http://urbanstoic.com/how-to-fix-google-hfeed-or-hcard-warnings)
 * In this article the solution is to modify author and update codes in the single.
   php file. My problem is that the Customizr theme does not have that file.
 * Is there another solution to remove these errors in Webmaster?
 *  [Matthew](https://wordpress.org/support/users/kidsguide/)
 * (@kidsguide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200755)
 * To fix it, just make a single.php. Have you tried the single.php?
 *  [ElectricFeet](https://wordpress.org/support/users/electricfeet/)
 * (@electricfeet)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/#post-5200757)
 * ifixlv: could you post the full errors from Google? I’m pretty sure that article
   is not your solution. We’ve covered this before here, but I need the precise 
   errors to look it up.

Viewing 15 replies - 1 through 15 (of 32 total)

1 [2](https://wordpress.org/support/topic/create-custom-singlephp-file/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/create-custom-singlephp-file/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/create-custom-singlephp-file/page/2/?output_format=md)

The topic ‘Create custom single.php file’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

 * 32 replies
 * 6 participants
 * Last reply from: [Nicolaie](https://wordpress.org/support/users/szabadkai/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/create-custom-singlephp-file/page/3/#post-5200927)
 * Status: not resolved