Created
June 21, 2013 01:22
-
-
Save agusmu/5828199 to your computer and use it in GitHub Desktop.
PrimaShop - Creating Custom Page Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Custom | |
* Description: The template for displaying custom page with custom function. | |
* | |
* @category PrimaShop | |
* @package Templates | |
* @author PrimaThemes | |
* @link http://www.primathemes.com | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
get_header(); ?> | |
<section id="main" role="main" class="group"> | |
<div class="margin group"> | |
<div class="content-wrap group"> | |
<div id="content" class="group"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<?php if ( !prima_get_setting( 'breadcrumb_hide_page' ) && !prima_get_post_meta( '_page_breadcrumb_hide' ) ) : ?> | |
<?php prima_breadcrumb(); ?> | |
<?php endif; ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> > | |
<div class="entry"> | |
<?php if ( !prima_get_post_meta( '_page_title_hide' ) ) : ?> | |
<h1 class="post-title"><?php the_title(); ?></h1> | |
<?php endif; ?> | |
<div class="post-content group"> | |
<?php /* You can start adding your custom code below this line. */ ?> | |
<?php /* If you still want to show the page content, keep the line below. */ ?> | |
<?php the_content(); ?> | |
<?php /* Edit Post link will be displayed for logged in user only. */ ?> | |
<?php edit_post_link( __( 'Edit', 'primathemes' ), '<p>', '</p>' ); ?> | |
</div> | |
</div> | |
</article> | |
<?php endwhile; ?> | |
<?php else: ?> | |
<?php get_template_part( 'content', '404' ); ?> | |
<?php endif; ?> | |
</div> | |
<?php prima_sidebar( 'sidebar' ); ?> | |
</div> | |
<?php prima_sidebar( 'sidebarmini' ); ?> | |
</div> | |
</section> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tutorial: http://www.primathemes.com/documentation/creating-custom-page-template/