Special Offer: Buy All 48 Premium WordPress Themes for Just $74.99. Learn more

How to Remove the Page Header

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. Install and Activate the WP Editor plugin:https://wordpress.org/plugins/wp-editor/

It is a very useful plugin which allows you to edit files inside all of the theme folders:

WP Editor Plugin

 

2. Login to your WordPress Admin Panel, navigate to Left Menu -> Appearance -> Theme Editor and open your_theme/inc/utilities.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:
3. 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; ?>

 

4. 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 –>

 

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

 

And here’s the result:

hide page header with title

 

 

About the Author

Tihomir Ivanov is a WordPress web developer, founder of tishonator.com, a fan of Linux and Open Source, a gym enthusiast, a vegan, a fan of minimalism, good movies and books :)

Leave a Reply