Guest User

Custom Page Template with Pojo.me theme (WordPress)

a guest
Apr 15th, 2015
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.30 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Homepage
  4. */
  5. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  6.  
  7. $view = 'page';
  8. do_action( 'pojo_setup_body_classes', $view, get_post_type(), '' );
  9.  
  10. get_header();
  11. do_action( 'pojo_get_start_layout', $view, get_post_type(), '' );
  12.  
  13. if ( have_posts() ) :
  14.     while ( have_posts() ) : the_post(); ?>
  15.         <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  16.             <?php if ( po_breadcrumbs_need_to_show() ) : ?>
  17.                 <?php pojo_breadcrumbs(); ?>
  18.             <?php endif; ?>
  19.             <?php if ( pojo_is_show_page_title() ) : ?>
  20.             <header class="page-title">
  21.                 <h1><?php the_title(); ?></h1>
  22.             </header>
  23.             <?php endif; ?>
  24.             <div class="entry-content">
  25.                 <?php if ( ! Pojo_Core::instance()->builder->display_builder() ) : ?>
  26.                     <?php the_content(); ?>
  27.                     <?php pojo_link_pages(); ?>
  28.                 <?php endif; ?>
  29.             </div>
  30.             <footer>
  31.                 <?php pojo_button_post_edit(); ?>
  32.             </footer>
  33.         </article>
  34.         <?php
  35.             // Previous/next post navigation.
  36.             echo pojo_get_post_navigation(
  37.                 array(
  38.                     'prev_text' => __( '&laquo; Previous', 'pojo' ),
  39.                     'next_text' => __( 'Next &raquo;', 'pojo' ),
  40.                 )
  41.             );
  42.         ?>
  43.     <?php endwhile;
  44. else :
  45.     pojo_get_content_template_part( 'content', 'none' );
  46. endif;
  47. do_action( 'pojo_get_end_layout', $view, get_post_type(), '' );
  48. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment