Monochrome Pro Remove Before Footer CTA Widget Conditionally

Add this code to the Monochrome Pro themes functions file.

add_action( 'genesis_before_footer', 'remove_before_footer_cta', 8 );
function remove_before_footer_cta() {

if ( is_page( 'contact' ) ) {
remove_action( 'genesis_before_footer', 'monochrome_before_footer_cta' );

    }

}

This code removes the before footer CTA widget from the contact page only and uses the page slug contact with the is_page conditional tag.

Modify the is_page( 'contact' ) conditional tag to target specific pages.

Resources

remove_action
is_page

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.