WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Front_page title screws up all other pages... (2 posts)

  1. andersronnau
    Member
    Posted 5 years ago #

    I am running a new site with WordPress as a CMS with a modified version of Brian Gardners Neoclassical Theme.

    Everything is up and running except for one minor detail.

    I want the the_title on the (static) front page to be the bloginfo description, and when I in page.php replace:

    <h1><?php the_title(); ?></h1>

    with

    <?php if (is_front_page()) { ?><h1><?php bloginfo('description'); ?></h1><?php } else { ?><h1><?php the_title(); ?><h1><?php } ?>

    I get a beautiful result on the front page. Perfect.

    BUT every other page gets absolutely screwed up. A lot of the formatting goes haywire and I have no idea what to do about it.

    I'll let the site sit for a couple of hours with the error on it, so you can go see for yourself.

    http://www.111c.dk

    I hope that one of you guys have an idea about what to do about it.

    Thanks!

    /Anders.

  2. andersronnau
    Member
    Posted 5 years ago #

    Hi All

    Got it to work. Used the_title wrong.

    http://codex.wordpress.org/Template_Tags/the_title

    Had to put <h1>'s inside the call to the_title:

    <?php the_title('<h3>', '</h3>'); ?>

    Best

    Anders...

Topic Closed

This topic has been closed to new replies.

About this Topic