Special Offer: Get All 151 Premium WordPress Themes for Just $99.99 $59.99 Purchase Now Learn more

How to Remove the Page Header

How to Remove the Page Header

Most of our Premium Themes comes with Page Hader (screenshot above). But in some specific cases you may want to remove it. Here are all of the necessary steps:

1. Login to your WordPress Admin Panel, navigate to Left Menu -> Appearance -> Editor and open your_theme/functions.php

Below the following code:

function tishonator_show_page_header_section() {

Insert

return;

After the change, your code will looks like:

function tishonator_show_page_header_section() {

    return;

    global $paged, $page;

Applying only the above step will simply hide the page header, here’s the result:

hide page header result
However, you may want to display the title. Here’s how it can be done:

2. Open your_theme/content.php file.

Replace:

<?php if ( !is_single() ) :

echo ‘<h1 class=”entry-title”><a href=”‘ . esc_url( get_permalink() ) . ‘” rel=”bookmark” title=”‘.get_the_title().'”>’.get_the_title().'</a></h1>’;

endif;
?>

with:

<?php if ( is_single() ) : ?>

<h1 class=”entry-title”>
<?php the_title(); ?>
</h1>

<?php else : ?>

<h1 class=”entry-title”>
<a href=”<?php the_permalink(); ?>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?></a>
</h1>

<?php endif; ?>

3. Open your_theme/content-page.php

Below <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

Insert:

<h1 class=”entry-title”>
<?php echo get_the_title(); ?>
</h1><!– .entry-title –>

4. Open your_theme/content-page-clean.php and apply the same change as in previous step.

And here’s the result:

hide page header with title