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