How to add One Page template in Twenty thirteen theme wordpress?
Add One Page template in Twenty thirteen theme wordpress.
Here i will tell you that how to create one page template in twenty thirteen theme
Step 1: create a folder inside theme folder themes/twentythirteen/
Like : themes/twentythirteen/page-templates
Step 2: Create a file named one-page.php inside page-templates folder
Step 3: Copy and paste this code in your one-page.php page
<?php
/**
* Template Name: One Page
*
* Author Olivia Hoback
* www.olivia.nu
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-lg-12 inner">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail('full', array('class' => 'img-responsive featured')); ?>
</div>
<?php endif; ?>
<span><?php the_content(); ?><?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?></span>
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
<?php comments_template(); ?>
</div>
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
Step 4: Now go to your admin and click on add new page
Step5: On the right side bar under Page Attribute -> Template dropdown , Choose One page template
See your page now
Done :P
Here i will tell you that how to create one page template in twenty thirteen theme
Step 1: create a folder inside theme folder themes/twentythirteen/
Like : themes/twentythirteen/page-templates
Step 2: Create a file named one-page.php inside page-templates folder
Step 3: Copy and paste this code in your one-page.php page
<?php
/**
* Template Name: One Page
*
* Author Olivia Hoback
* www.olivia.nu
* @package WordPress
* @subpackage Twenty_Thirteen
* @since Twenty Thirteen 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<div class="col-lg-12 inner">
<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
<div class="entry-thumbnail">
<?php the_post_thumbnail('full', array('class' => 'img-responsive featured')); ?>
</div>
<?php endif; ?>
<span><?php the_content(); ?><?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?></span>
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
</footer><!-- .entry-meta -->
<?php comments_template(); ?>
</div>
<?php endwhile; ?>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_footer(); ?>
Step 4: Now go to your admin and click on add new page
Step5: On the right side bar under Page Attribute -> Template dropdown , Choose One page template
See your page now
Done :P
Comments
Post a Comment