• Resolved stereokill

    (@stereokill)


    Hi guys,

    I’m running a WordPress install on my website, and have the Simple:Press forum plugin installed and running. On the page used for the forum (https://www.stereokill.net/forums), I’d like to make the page title invisible. As you can see, it says “Forum” at the top of the page – while this is only a minor bugbear for me, it’s one I’d like to take care of if possible.

    I’m assuming I need to do this via PHP, but I’m not confident enough to mess around too much without guidance on which functions I’m supposed to edit.

    Any help would be much appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • In your theme’s page.php there should be a snippet of code which says:
    <h2><?php the_title();} ?></h2>
    replace that with
    <?php if(get_the_title()!=’Forum’){?><h2><?php the_title();} ?></h2><?php } ?>
    That should do the trick!

    Thread Starter stereokill

    (@stereokill)

    Brilliant, thank you – can I use syntax for multiple variables to exclude more than one page? So, for example:

    <?php if(get_the_title()!='Forum','Gallery')...<?php }?>

    *edit* – just tried your solution, and it gave me a parsing error when I tried to then open the page.

    Oops typo should be:
    <?php if(get_the_title()!='Forum'){?><h2><?php the_title(); ?></h2><?php } ?>
    and no you can’t use that syntax you would have to do:
    <?php if(get_the_title()!=’Forum’ && get_the_title()!=’Gallery’ && get_the_title()!=’Contact’){?><h2><?php the_title(); ?></h2><?php } ?>

    Thread Starter stereokill

    (@stereokill)

    Brilliant, thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding single page title’ is closed to new replies.