Forums

[resolved] Hiding single page title (5 posts)

  1. stereokill
    Member
    Posted 3 years ago #

    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 (http://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!

  2. tomontoast
    Member
    Posted 3 years ago #

    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!

  3. stereokill
    Member
    Posted 3 years ago #

    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.

  4. tomontoast
    Member
    Posted 3 years ago #

    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 } ?>

  5. stereokill
    Member
    Posted 3 years ago #

    Brilliant, thanks a lot.

Topic Closed

This topic has been closed to new replies.

About this Topic