WordPress.org

Ready to get started?Download WordPress

Forums

Disable Title
Great plugin - suggested improvement (3 posts)

  1. hennemark
    Member
    Posted 1 year ago #

    I like the plugin, but wish teh blank space created by eliminating the page title was removed by shifting the underlying text up. Can this be added?

    http://wordpress.org/extend/plugins/disable-title/

  2. Frank Staude
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    the plugin from WordPress just gets the title and replace it with an empty string. To the environment of the title (for example, the <H1> tags or DIV Container) the plugin has no effect. You'd have to query in your theme. There you have you code like

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

    which you can change in

    <?php
    $title = get_the_title();
    if ( $title == "" ) { ?>
    <h1> <?php the_title(); ?> </h1>
    <?php } ?>

    Then the H1 is only printed if the title is not disabled.

    Frank

  3. Frank Staude
    Member
    Plugin Author

    Posted 1 year ago #

    Ups,

    the correct Code ist

    <?php
    $title = get_the_title();
    if ( $title != "" ) { ?>
    <h1> <?php the_title(); ?> </h1>
    <?php } ?>

    Frank

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic