How not to show the page title on definite pages ?
-
Hi everybody,
My problem is the following : I would like to modify my forum pages so that the page title doesn’t appear on them. They all begin with “https://www.litteratureaudio.com/index.php/forums/”. Of course, I don’t want to make disappear the titles on the other pages I’ve got on my website.
That’s why I’ve tried to modify the page.php template, but without success. I think it’s because you can’t use the <?php … ?> syntax inside a <?php … ?> loop.
Could you help me find a solution ? Here is the code’s part of the page.php template in question :
<?php if($_SERVER['REQUEST_URI'] == "/index.php/notre-association/" OR $_SERVER['REQUEST_URI'] == "/index.php/nous-aider/" OR $_SERVER['REQUEST_URI'] == "/index.php/nous-contacter/" OR $_SERVER['REQUEST_URI'] == "/index.php/livre-dor/" OR $_SERVER['REQUEST_URI'] == "/index.php/notre-bibliotheque-de-livres-audio-gratuits/" OR $_SERVER['REQUEST_URI'] == "/index.php/classement-de-nos-livres-audio-gratuits-par-notes/" OR $_SERVER['REQUEST_URI'] == "/index.php/classement-de-nos-livres-audio-gratuits-par-votes/" OR $_SERVER['REQUEST_URI'] == "/index.php/livres-audio-gratuits-sur-internet/" OR $_SERVER['REQUEST_URI'] == "/index.php/ebooks-gratuits-sur-internet/" OR $_SERVER['REQUEST_URI'] == "/index.php/referencement/"){ echo "<div id='content'>"; } else{ echo "<div id='content2'>"; } ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="entry"> <h3 class="entrytitle" id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark"> <?php the_title(); ?> </a> </h3> <div class="entrymeta-single"> <?php edit_post_link(__('<strong> Éditer</strong>'));?> </div>
What I would like to do is to insert all this code in the “if” condition and leave the “else” condition blank.
Thanks for your help.
- The topic ‘How not to show the page title on definite pages ?’ is closed to new replies.