Hide WordPress header image on specific URL

Objective: Hide WordPress header image on specific URL

Target URL: All URL except http://hilmanali.com/blog/

Theme: Sorbet (child)

File name: header.php

Original code:

<body <?php body_class(); ?>>

Modified code:

<body <?php body_class(); ?>>
<?php
global $wp;
$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );
$is_specific_network = stripos( $current_url, 'http://hilmanali.com/blog/page/' );
?>

Screenshots:

2016-11-07_22_48_26

2016-11-07_22_49_05

2016-11-07_22_49_17

 

Advertisements

Author: Hilman

I'm a dad! :-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s