Removing Page title
-
Hello friends,
I need help, I am facing a wired problem & I need help.
In my custom theme I am using CSS + images to display the page title on each page, to do so I used the following code;
<h1 class="entry-title"><span><?php if ( ! is_page('home') ) { wp_title( '', true, 'right' );} else { ?>Home <?php } ?></span></h1>PROBLEM:
Every page (except the Post Page) is displaying the Page title twice because of the loop used for post, here is the code for that;<?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"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-content --> </div><!-- #post-## --> <?php comments_template( '', true ); ?> <?php endwhile; ?>If i remove the_title() from the post loop then problem is solved but then all posts are displayed without the title.
To see the problem kindly visit my site http://www.mentorarts.com/wordpress/advpress/Please I need help, I am badly stuck at this issue and I have limited knowledge about WordPress.
Thank you
The topic ‘Removing Page title’ is closed to new replies.