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:

Tinggalkan komen

This site uses Akismet to reduce spam. Learn how your comment data is processed.