250, 'height' => 250, 'flex-width' => true, 'flex-height' => true, ) ); add_theme_support( 'custom-background', array( 'default-color' => 'ffffff' ) ); add_theme_support( 'html5', array('comment-form','comment-list','gallery','caption',) ); add_editor_style( array( 'assets/css/editor-style.css') ); } /** * Register widget area. */ function auto_motors_widgets_init() { register_sidebar( array( 'name' => __( 'Blog Sidebar', 'auto-motors' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'auto-motors' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your sidebar on pages.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar 3', 'auto-motors' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'auto-motors' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'auto-motors' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'auto-motors' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'auto-motors' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'auto-motors' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'auto_motors_widgets_init' ); // enqueue styles for child theme function auto_motors_enqueue_styles() { wp_enqueue_style( 'auto-motors-fonts', automobile_hub_fonts_url(), array(), null ); // Bootstrap wp_enqueue_style( 'bootstrap-css', get_theme_file_uri( '/assets/css/bootstrap.css' ) ); // owl-carousel wp_enqueue_style( 'owl-carousel-css', get_theme_file_uri( '/assets/css/owl.carousel.css' ) ); // Theme block stylesheet. wp_enqueue_style( 'auto-motors-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'auto-motors-child-style' ), '1.0' ); // enqueue parent styles wp_enqueue_style('automobile-hub-style', get_template_directory_uri() .'/style.css'); // enqueue child styles wp_enqueue_style('auto-motors-child-style', get_stylesheet_directory_uri() .'/style.css', array('automobile-hub-style')); require get_theme_file_path( '/tp-theme-color.php' ); wp_add_inline_style( 'auto-motors-child-style',$automobile_hub_tp_theme_css ); wp_enqueue_script('owl.carousel-js', esc_url( get_theme_file_uri() ) . '/assets/js/owl.carousel.js',array('jquery'),'2.3.4', TRUE); wp_enqueue_script('auto-motors-custom-js', esc_url( get_theme_file_uri() ) . '/assets/js/auto-motors-custom.js',array('jquery'),'2.3.4',TRUE ); wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); $automobile_hub_body_font_family = get_theme_mod('automobile_hub_body_font_family', ''); $automobile_hub_heading_font_family = get_theme_mod('automobile_hub_heading_font_family', ''); $automobile_hub_menu_font_family = get_theme_mod('automobile_hub_menu_font_family', ''); $automobile_hub_tp_theme_css = ' body{ font-family: '.esc_html($automobile_hub_body_font_family).'!important; } p.simplep{ font-family: '.esc_html($automobile_hub_body_font_family).'!important; } h1{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } h2{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } h3{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } h4{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } h5{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } h6{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } #theme-sidebar .wp-block-search .wp-block-search__label{ font-family: '.esc_html($automobile_hub_heading_font_family).'!important; } .menubar{ font-family: '.esc_html($automobile_hub_menu_font_family).'!important; } '; wp_add_inline_style('automobile-hub-style', $automobile_hub_tp_theme_css); } add_action('wp_enqueue_scripts', 'auto_motors_enqueue_styles'); function auto_motors_admin_scripts() { // Backend CSS wp_enqueue_style( 'auto-motors-backend-css', get_theme_file_uri( '/assets/css/customizer.css' ) ); } add_action( 'admin_enqueue_scripts', 'auto_motors_admin_scripts' ); define('AUTO_MOTORS_CREDIT',__('https://www.themespride.com/themes/free-motors-wordpress-theme/','auto-motors') ); if ( ! function_exists( 'auto_motors_credit' ) ) { function auto_motors_credit(){ echo "".esc_html__(get_theme_mod('automobile_hub_footer_text',__('Auto Motors WordPress Theme','auto-motors'))).""; } } function auto_motors_header_style() { if ( get_header_image() ) : $automobile_hub_custom_header = " .headerbox{ background-image:url('".esc_url(get_header_image())."'); background-position: center top; background-size: cover; }"; wp_add_inline_style( 'auto-motors-child-style', $automobile_hub_custom_header ); endif; } add_action( 'wp_enqueue_scripts', 'auto_motors_header_style' ); // Featured Cars Meta function auto_motors_bn_custom_meta_featured() { add_meta_box( 'bn_meta', __( 'Car Feature Meta Feilds', 'auto-motors' ), 'auto_motors_meta_callback_featured_car', 'post', 'normal', 'high' ); } /* Hook things in for admin*/ if (is_admin()){ add_action('admin_menu', 'auto_motors_bn_custom_meta_featured'); } function auto_motors_meta_callback_featured_car( $post ) { wp_nonce_field( basename( __FILE__ ), 'auto_motors_featured_car_meta_nonce' ); $bn_stored_meta = get_post_meta( $post->ID ); $auto_motors_compare_price = get_post_meta( $post->ID, 'auto_motors_compare_price', true ); $auto_motors_body_type = get_post_meta( $post->ID, 'auto_motors_body_type', true ); $auto_motors_model_year = get_post_meta( $post->ID, 'auto_motors_model_year', true ); $auto_motors_engine_type = get_post_meta( $post->ID, 'auto_motors_engine_type', true ); $auto_motors_car_color = get_post_meta( $post->ID, 'auto_motors_car_color', true ); $auto_motors_car_mileage = get_post_meta( $post->ID, 'auto_motors_mileage', true ); ?>