Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Preventing page title from showing on single post pages (http://forum.bytesforall.com/showthread.php?t=4130)

bill Oct 30, 2009 12:42 AM

Preventing page title from showing on single post pages
 
Atahualpa is a great theme.

It would be great to know how to prevent page titles from showing on single post pages while showing on all other pages (except the homepage).

Here's an example of the problem: http://makingmindsmatter.com/2009/10/30/cheap-schools/

On this page (and all other single post pages) my post title appears twice. I would like to get rid of the top one.

I added this code to create page titles:

<h2><?php wp_title(); ?></h2>

What I don't know is how to write code to prevent the page title from showing on single post pages.

bill Oct 30, 2009 04:11 AM

Never mind. I figured it out. I copied index.php, renamed it single.php, took out the code related to above the loop, and then put the single.php in the same folder as the index.php. Worked right away.

juggledad Oct 30, 2009 08:37 PM

you probably could do the same thing by just putting a php IF in 'The LOOP' and then you wouldn't have to worry about the next upgrade with something link changing the line

HTML Code:

<?php bfa_post_headline('<div class="post-headline">','</div>'); ?>
to
HTML Code:

<?php if (!is_single()) {bfa_post_headline('<div class="post-headline">','</div>'); } ?>
Where and why did you add the '<h2><?php wp_title(); ?></h2>' ?

bill Oct 30, 2009 10:12 PM

I added the '<h2><?php wp_title(); ?></h2>' above the loop because I wanted titles on my pages.

juggledad Oct 31, 2009 04:18 AM

But page titles will display on the page??


All times are GMT -6. The time now is 06:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.