Hide page titles in wordpress twenty thirteen
-
Hello Sir,
Please guide me how to Hide page titles in wordpress twenty thirteen. i tried following but could not succeed.We would need to know which theme you are using, or you can look for yourself, in the themes folder there will be a file called page.php
Lets work through an example with twenty ten, we open page.php, look for and find the code the_title() which is a function call.
<?php if ( is_front_page() ) { ?>
<h2 class=”entry-title”><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class=”entry-title”><?php the_title(); ?></h1>
<?php } ?>
the_title() is how we identify the page title, and the element is identified by the class=”entry-title”, so we have to hide the title, to do this we can add a css inline style to the element style=”display: none;”There are two ways to do this one is modify the file and upload it via ftp, the second is from Admin > Appearance > Editor and find the page.php file.
<?php if ( is_front_page() ) { ?>
<h2 class=”entry-title” style=”display: none;”><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class=”entry-title” style=”display: none;”><?php the_title(); ?></h1>
<?php } ?>
If the element is still taking up real estate we can change the height as well with style=”display: none; height= 0px;”PLEASE HELP ME HOW TO DO.
- The topic ‘Hide page titles in wordpress twenty thirteen’ is closed to new replies.