Support » Plugin: Custom Post Template » [Plugin: Custom Post Template] Custom post template guts all other formatting

  • Hi there,

    Not incredibly experienced- learning through a lot of trial and error- hoping to get an answer on this.

    I initially used custom post templates in the jas-personal-publisher theme, and it worked fine. I’m doing a redesign for our company’s blog using the Brunelleschi theme, and we need multiple custom post templates for compliance reasons.

    I followed the same protocol as before when developing the custom templates- pasting in the following code at the top:

    Template Name Posts: Type 1

    The code after that is the same as the post code found in loop-single.php. Using the same method as before, I attempted to paste in code for a paragraph to follow the post after the entry content, similar to below:

    <div class="entry-content">
       <?php the_content(); ?>
       <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'brunelleschi' ), 'after' => '</div>' ) ); ?>
       <p>This is a disclaimer</p>
    </div><!-- .entry-content -->

    I then put up a post, selecting the custom template before publishing. The result? A plain-text webpage with the blog content stripped of all blog formatting. Any explanation as to why? Any suggestions on how to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you figure this out?

    In case others are having this issue — Lnelson, rather than the loop-single.php you copied, the file you need to copy/replicate is single.php, which has a lot more code in it, including references to header and footer and everything else the page needs to work correctly and look like you want it to.

    The template you create replaces single.php for that post, so you need everything single.php has, just tweak it for your uses.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Custom Post Template] Custom post template guts all other formatting’ is closed to new replies.