Page template isn't showing page heading
-
I started using a custom page template for the 1st time, and the one I found does everything I want (just show the content) but it doesn’t show the page’s heading. It just starts with the main content. Here’s the code I’m using (I don’t know PHP, but know how to add it to the page if someone tells me what to add.)
<?php /** Template Name: OneColumn */ get_header(); ?> <div class="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" class="post"> <?php the_title( '<h1 class="page-title entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h1>', false ); ?> <div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<p class="pages">' . __('Pages:', 'example'), 'after' => '</p>' ) ); ?> </div> </div> <?php endwhile; ?> <?php else: ?> <p class="no-data"><?php _e('Sorry, no page matched your criteria.', 'example'); ?></p> <?php endif; ?> </div> <?php get_footer(); ?>
Thanks in advance for your help.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Page template isn't showing page heading’ is closed to new replies.