Support » Plugin: Disable Title » Great plugin – suggested improvement

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Frank Neumann-Staude

    (@fstaude)

    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

    Plugin Author Frank Neumann-Staude

    (@fstaude)

    Ups,

    the correct Code ist

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

    Frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Great plugin – suggested improvement’ is closed to new replies.