Last active
December 22, 2018 00:32
-
-
Save thecodepoetry/22463be7cbeda46bbaf00f6641d1ce26 to your computer and use it in GitHub Desktop.
Sidebar, footer in 404page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'get_header', 'dt_404_widget', 10 ); | |
function dt_404_widget() { | |
$config = Presscore_Config::get_instance(); | |
if( is_404() ) { | |
$config->set( 'sidebar_position', 'right' ); | |
$config->set( 'sidebar_widgetarea_id', 'sidebar_1' ); | |
$config->set( 'footer_show', '1' ); | |
$config->set( 'footer_widgetarea_id', 'sidebar_2' ); | |
} | |
} |
add_action( 'get_header', 'dt_404_widget', 10 );
function dt_404_widget() {
$config = Presscore_Config::get_instance();
if( get_post_type() == 'dspe_gallery' ) {
// $config->set( 'sidebar_position', 'right' );
// $config->set( 'sidebar_widgetarea_id', 'sidebar_1' );
$config->set( 'footer_show', '1' );
$config->set( 'footer_widgetarea_id', 'sidebar_2' );
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this code in your child theme functions.php