__( 'Main Menu', 'amigo' ), ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'amigo-home', 476, 634, true ); add_image_size( 'amigo-slider', 765, 430, true ); add_image_size( 'amigo-single', 1170, 400, true ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // Add Custom Background Support $args = array( 'default-color' => '424242', ); add_theme_support( 'custom-background', $args ); // Set Content Width if ( !isset( $content_width ) ) $content_width = 800; // Enable support for Post Formats. add_theme_support( 'post-formats', array( 'video', 'gallery' ) ); // Display a admin notices add_action( 'admin_notices', 'amigo_admin_notice' ); } endif; //////////////////////////////////////////////////////////////////// // Admin notices //////////////////////////////////////////////////////////////////// function amigo_admin_notice() { global $current_user; $user_id = $current_user->ID; /* Check that the user hasn't already clicked to ignore the message */ if ( !get_user_meta( $user_id, 'amigo_ignore_notice' ) ) { echo '
'; printf( __( 'Like Amigo theme? You will LOVE Amigo PRO! ', 'amigo' ) . '' . __( 'Click here for all the exciting features.', 'amigo' ) . '', '?amigo_notice_ignore=0' ); echo "
';
echo '';
}
////////////////////////////////////////////////////////////////////
// Enqueue Styles (normal style.css and bootstrap.css)
////////////////////////////////////////////////////////////////////
function amigo_theme_stylesheets() {
wp_enqueue_style( 'amigo-bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'amigo-stylesheet', get_stylesheet_uri() );
// load Font Awesome css
wp_enqueue_style( 'amigo-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', false );
// load Flexslider css
wp_enqueue_style( 'amigo-stylesheet-flexslider', get_template_directory_uri() . '/css/flexslider.css', 'style' );
}
add_action( 'wp_enqueue_scripts', 'amigo_theme_stylesheets' );
////////////////////////////////////////////////////////////////////
// Register Bootstrap JS with jquery
////////////////////////////////////////////////////////////////////
function amigo_theme_js() {
wp_enqueue_script( 'amigo-bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ) );
wp_enqueue_script( 'amigo-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ) );
wp_enqueue_script( 'amigo-flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'amigo_theme_js' );
////////////////////////////////////////////////////////////////////
// Theme Info page
////////////////////////////////////////////////////////////////////
if ( is_admin() ) {
require_once(trailingslashit( get_template_directory() ) . 'lib/theme-info.php');
}
////////////////////////////////////////////////////////////////////
// Register Custom Navigation Walker include custom menu widget to use walkerclass
////////////////////////////////////////////////////////////////////
require_once( trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php');
////////////////////////////////////////////////////////////////////
// Register the Sidebar(s)
////////////////////////////////////////////////////////////////////
add_action( 'widgets_init', 'amigo_widgets_init' );
function amigo_widgets_init() {
register_sidebar(
array(
'name' => __( 'Right Sidebar', 'amigo' ),
'id' => 'amigo-right-sidebar',
'before_widget' => '',
'before_title' => '