Seperating Post Title and Page Title
-
Hello Friends,
I am new to WP and I am badly stuck with Post Title and Page Title.I made my own custom theme where I am displaying “Page Title” using some graphics.
<div class=”content” role=”main”>
<div class=”pagename”><h1 class=”entry-title”><span><?php the_title(); ?></span></h1></div>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<h2 class=”post-title”><span><?php the_title(); ?></span></h2>
<div class=”entry-content”> ………PROBLEM
- All the pages are displaying Title twice because the_title(); is also mentioned in Post.
- The Blog page “BLOG” when opened the page title is been replaced by the recent post title. I want the page title to display.
I tried using wp_title in H1 it solves the problem but then the default static page displays nothing at Page Title. Please help me solve this problem, i worked really hard to built this theme.
- The topic ‘Seperating Post Title and Page Title’ is closed to new replies.