Skip to content

Instantly share code, notes, and snippets.

@arielk arielk/custom-page-template.php Secret
Last active Feb 5, 2017

Embed
What would you like to do?
Custom Page Template for Pojo Themes
<?php
/**
* Template Name: Custom Page Template
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
do_action( 'pojo_setup_body_classes', 'page', get_post_type(), '' );
get_header();
do_action( 'pojo_get_start_layout', 'page', get_post_type(), '' );
if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( po_breadcrumbs_need_to_show() ) : ?>
<?php pojo_breadcrumbs(); ?>
<?php endif; ?>
<?php if ( pojo_is_show_page_title() ) : ?>
<header class="page-title">
<h1><?php the_title(); ?></h1>
<?php do_action( 'pojo_after_page_title' ); ?>
</header>
<?php endif; ?>
<div class="entry-content">
<?php if ( ! Pojo_Core::instance()->builder->display_builder() ) : ?>
<?php the_content(); ?>
<?php endif; ?>
</div>
<?php if ( is_singular() ) : ?>
<footer>
<?php pojo_button_post_edit(); ?>
</footer>
<?php endif; ?>
</article>
<?php endwhile;
else :
pojo_get_content_template_part( 'content', 'none' );
endif;
do_action( 'pojo_get_end_layout', 'page', get_post_type(), '' );
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.