Last active
December 30, 2015 10:29
-
-
Save agusmu/7816555 to your computer and use it in GitHub Desktop.
PrimaShop - Create Page With Comments Displayed
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: Page With Comments | |
* Description: The template for displaying comments on a page. | |
* | |
* @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 /* If needed, you can add 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 comments_template( '', true ); ?> | |
<?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
http://www.primathemes.com/documentation/creating-page-comments-page-template/