Skip to content

Instantly share code, notes, and snippets.

@ldugaduga
Created September 17, 2017 02:31
Show Gist options
  • Save ldugaduga/81db3c27c975b7afc697b6141aa1ecf5 to your computer and use it in GitHub Desktop.
Save ldugaduga/81db3c27c975b7afc697b6141aa1ecf5 to your computer and use it in GitHub Desktop.
<?php
require_once('wp_bootstrap_navwalker.php');
// Declare sidebar widget zone
if (function_exists('register_sidebar')) {
register_sidebar(array(
'name' => 'Sidebar Widgets',
'id' => 'sidebar-widgets',
'description' => 'These are widgets for the sidebar.',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
// Declare menus
if (function_exists('register_nav_menus')){
register_nav_menus(
array(
'main_nav' => 'Main Navigation Menu',
'footer_nav' => 'Footer Menu'
)
);
}
// Add support for Featured Images
if (function_exists('add_theme_support')) {
// add_theme_support('post-thumbnails', array( 'post', 'page' ) );
add_theme_support('post-thumbnails');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment