Skip to content

Instantly share code, notes, and snippets.

@bigdigital
Created September 21, 2017 06:42
Show Gist options
  • Save bigdigital/2e1ca0f355d3313fd72662c1bec54fd3 to your computer and use it in GitHub Desktop.
Save bigdigital/2e1ca0f355d3313fd72662c1bec54fd3 to your computer and use it in GitHub Desktop.
The7 add widgets to 404 page
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' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment