tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'aqueduct-xlarge', 720, 480, true ); add_image_size( 'aqueduct-large', 480, 320, true ); // This theme uses wp_nav_menu() in one location. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'aqueduct' ), 'secondary' => __( 'Secondary Menu', 'aqueduct' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', ) ); */ } endif; // epidermis_das_themes_setup add_action( 'after_setup_theme', 'howlthemes_setup' ); /** * Register widget area. * * @link http://codex.wordpress.org/Function_Reference/register_sidebar */ function howlthemes_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'aqueduct' ), 'id' => 'sidebar-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'howlthemes_widgets_init' ); function howlthemes_fwidgets_init() { register_sidebar( array( 'name' => __( 'Footer', 'aqueduct' ), 'id' => 'footer-1', 'description' => '', 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'howlthemes_fwidgets_init' ); function howlthemes_excerpt_length( $length ) { return 25; } add_filter( 'excerpt_length', 'howlthemes_excerpt_length', 999 ); /** * Enqueue scripts and styles. */ function howlthemes_scripts() { wp_enqueue_style( 'drag-themes-style', get_stylesheet_uri(), '', true); if(get_theme_mod("typography-setting")){ wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family='. str_replace(" ", "+", get_theme_mod("typography-setting")) .':400,700'); } else{ wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Titillium+Web:400,600,700'); } wp_enqueue_style( 'font-awesome', get_template_directory_uri().'/css/font-awesome.min.css'); wp_enqueue_script( 'myscript', get_template_directory_uri().'/js/dragjs.js', array( 'jquery' ), '', true); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply', '', true); } } add_action( 'wp_enqueue_scripts', 'howlthemes_scripts' ); /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * HowlThemes Functions */ require get_template_directory() . '/inc/dragfun/dragthemesfunction.php'; /*------------------------ Removing Some Default Widgets --------------------*/ function howlthemes_unregister_default_widgets() { unregister_widget('WP_Widget_Pages'); unregister_widget('WP_Widget_Links'); unregister_widget('WP_Widget_Meta'); unregister_widget('WP_Widget_RSS'); unregister_widget('WP_Nav_Menu_Widget'); unregister_widget('WP_Widget_Recent_Posts'); } add_action('widgets_init', 'howlthemes_unregister_default_widgets', 11); /*------------------------------------------------------------- Social Media Follow Buttons -----------------------------------------*/ function howlthemes_socialmediafollow(){ if(get_theme_mod("fsocial_url")){ echo'
  • '; } if(get_theme_mod("tsocial_url")){ echo'
  • '; } if(get_theme_mod("gsocial_url")){ echo'
  • '; } if(get_theme_mod("psocial_url")){ echo'
  • '; } if(get_theme_mod("isocial_url")){ echo'
  • '; } if(get_theme_mod("lsocial_url")){ echo'
  • '; } if(get_theme_mod("ysocial_url")){ echo'
  • '; } if(get_theme_mod("rsocial_url")){ echo'
  • '; } } /*------------------ * Support Core Logo --------------------*/ function aqueduct_logo_setup() { add_theme_support( 'custom-logo' ); } add_action( 'after_setup_theme', 'aqueduct_logo_setup' ); function aqueduct_oldlogotonew(){ if (get_theme_mod('howl-themes_logo') && function_exists('get_custom_logo')) { $logo = attachment_url_to_postid( get_theme_mod( 'howl-themes_logo' ) ); if ( is_int( $logo ) ) { set_theme_mod( 'custom_logo', $logo ); } remove_theme_mod( 'howl-themes_logo' ); } } add_action( 'after_setup_theme', 'aqueduct_oldlogotonew' ); function aqueduct_previous_magazine_settings() { if(get_theme_mod("newsbox_one") || get_theme_mod("newsbox_two") || get_theme_mod("newsbox_three") || get_theme_mod("newsbox_four") || get_theme_mod("newsbox_five")){ // Slider if(get_theme_mod("newsbox_one")){ $slider_cat = get_theme_mod("newsbox_one"); remove_theme_mod( 'newsbox_one' ); } else{ $slider_cat = 'none'; } //Carousel if(get_theme_mod("newsbox_two")){ $carousel_cat = get_theme_mod("newsbox_two"); remove_theme_mod( 'newsbox_two' ); } else{ $carousel_cat = 'none'; } //Grid 1 if(get_theme_mod("newsbox_three")){ $gridone_cat = get_theme_mod("newsbox_three"); remove_theme_mod( 'newsbox_three' ); } else{ $gridone_cat = 'none'; } //Grid 2 if(get_theme_mod("newsbox_four")){ $gridtwo_cat = get_theme_mod("newsbox_four"); remove_theme_mod( 'newsbox_four' ); } else{ $gridtwo_cat = 'none'; } //Blog if(get_theme_mod("newsbox_five")){ $blog_cat = get_theme_mod("newsbox_five"); remove_theme_mod( 'newsbox_five' ); } else{ $blog_cat = 'none'; } $all_prev_cat = $slider_cat. ', '. $carousel_cat. ', '. $gridone_cat. ', '. $gridtwo_cat. ', '. $blog_cat. ','; set_theme_mod( 'category_remember', $all_prev_cat ); $prev_box_arrang = '1, 2, 3, 4, 5,'; set_theme_mod( 'homebuilder', $prev_box_arrang ); } } add_action( 'after_setup_theme', 'aqueduct_previous_magazine_settings' );