add_section( 'analogous_logo_section' , array( 'title' => __( 'Logo', 'analogous' ), 'priority' => 30, 'description' => 'Upload a logo to replace the default site name and description in the header', )); $wp_customize->add_setting( 'analogous_logo', array( 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'analogous_logo', array( 'label' => __( 'Logo', 'analogous' ), 'section' => 'analogous_logo_section', 'settings' => 'analogous_logo', ))); } require get_template_directory() . '/inc/customizer.php'; //Set Content Width if ( ! isset( $content_width ) ) $content_width = 900; /** * Enqueue scripts and styles */ function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); // Search Menu add_filter('wp_nav_menu_items', 'add_analogous_search_form_to_menu', 10, 2); function add_analogous_search_form_to_menu($items, $args) { if( !($args->theme_location == 'main') ) { return $items; } return $items . ''; } // Add Your Menu Locations function register_my_menus() { register_nav_menus( array('primary_navigation' => __( 'Primary Menu','analogous' ), 'secondary_navigation' => __( 'Secondary Menu','analogous' )) ); } add_action( 'init', 'register_my_menus' ); /* Register widgetized area and update sidebar with default widgets */ function analogous_sidebar_widgets_init() { register_sidebar( array( 'name' => __( 'Main sidebar', 'analogous' ), 'id' => 'side_bar', 'description' => __( 'The main sidebar appears on the right on each page except the front page template', 'analogous' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '', ) ); } function analogous_footer_widget1_init() { register_sidebar( array( 'name' => __( 'Footer widget1', 'analogous' ), 'id' => 'analogous_footer_widget1', 'description' => __( 'The Footer Widget1 appears on the right on each page except the front page template', 'analogous' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } function analogous_footer_widget2_init() { register_sidebar( array( 'name' => __( 'Footer widget2', 'analogous' ), 'id' => 'analogous_footer_widget2', 'description' => __( 'The Footer Widget1 appears on the right on each page except the front page template', 'analogous' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } function analogous_footer_widget3_init() { register_sidebar( array( 'name' => __( 'Footer widget3', 'analogous' ), 'id' => 'analogous_footer_widget3', 'description' => __( 'The Footer Widget1 appears on the right on each page except the front page template', 'analogous' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'analogous_sidebar_widgets_init' ); add_action( 'widgets_init', 'analogous_footer_widget1_init' ); add_action( 'widgets_init', 'analogous_footer_widget2_init' ); add_action( 'widgets_init', 'analogous_footer_widget3_init' ); // Pagination function numeric_posts_pagination() { if( is_singular() ) return; global $wp_query; $big = 999999999; // need an unlikely integer echo '
' . "\n"; } /*--------------------------------------------add Theme setting Menu---------------------------------------------------------*/ add_action( 'admin_init', 'theme_options_init' ); add_action( 'admin_menu', 'theme_options_add_page' ); function theme_options_init(){ register_setting( 'sample_options', 'sample_theme_options'); } function theme_options_add_page() { add_theme_page( __( 'Theme Options', 'analogous' ), __( 'Theme Options', 'analogous' ), 'edit_theme_options', 'theme_options', 'theme_settings_page' ); } function theme_options_do_page() { global $select_options; if ( ! isset( $_REQUEST['settings-updated'] ) ) $_REQUEST['settings-updated'] = false; } /*//////////////////////////////////////////////// Addd theme option under appearence /////////////////////////////////////////////////////*/ function theme_settings_page() { echo '

Theme Panel

'; echo '
'; settings_fields("section"); do_settings_sections("theme-options"); submit_button(); echo '
'; } add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); add_theme_support( 'automatic-feed-links' ); add_filter( 'use_default_gallery_style', '__return_false' ); function display_twitter_element() { ?> ' . $html . ''; } add_filter( 'embed_oembed_html', 'alx_embed_html', 10, 3 ); add_filter( 'video_embed_html', 'alx_embed_html' ); // Jetpack function advanced_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
id="comment-">
says:

comment_approved == '0') : ?>

$depth, 'max_depth' => $args['max_depth']))) ?>