tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); // This theme uses wp_nav_menu() in single locations. add_theme_support( 'nav-menus' ); register_nav_menu('primary', esc_html__( 'Primary Menu', 'techup' ) ); /* * 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', ) ); // Add the custom background prperty add_theme_support( 'custom-background', apply_filters( 'techup_custom_background_args', array( 'default-color' => '#000000', 'default-image' => '', ) ) ); // Add supportive refresh widgets add_theme_support( 'customize-selective-refresh-widgets' ); // Add default posts and comments RSS feed links add_theme_support( 'automatic-feed-links' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); /** * Add support for core custom logo. * * @link https://codex.wordpress.org/Theme_Logo */ add_theme_support( 'custom-logo', array( 'height' => 250, 'width' => 250, 'flex-width' => true, 'flex-height' => true, ) ); } endif; add_action( 'after_setup_theme', 'techup_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width */ function techup_content_width() { // This variable is intended to be overruled from themes. // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( 'techup_content_width', 640 ); } add_action( 'after_setup_theme', 'techup_content_width', 0 ); /** * Set the theme version, based on theme stylesheet. * * @global string $techup_theme_version */ function techup_theme_version_info() { $techup_theme_info = wp_get_theme(); $GLOBALS['techup_theme_version'] = $techup_theme_info->get( 'Version' ); } add_action( 'after_setup_theme', 'techup_theme_version_info', 0 ); function techbit_change_excerpt( $text ) { $pos = strrpos( $text, '['); if ($pos === false) { return $text; } return rtrim (substr($text, 0, $pos) ); } add_filter('get_the_excerpt', 'techbit_change_excerpt'); /** * Register widget area. * * @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar */ function techup_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar', 'techup' ), 'id' => 'blog-sidebar', 'description' => esc_html__( 'Add widgets here.', 'techup' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area', "techup"), 'id' => 'footer-widget-area', 'description' => esc_html__( 'The footer widget area', "techup"), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'techup_widgets_init' ); add_action( 'admin_init', 'techup_detect_button' ); function techup_detect_button() { wp_enqueue_style( 'techup-button', get_template_directory_uri() . '/assets/css/notice-button.css' ); } /** * Custom template tags for this theme. */ require get_template_directory() . '/inc/template-tags.php'; /** * File to manage the custom body classes */ require get_template_directory() . '/inc/template-css-class.php'; /** * Functions which enhance the theme by hooking into WordPress. */ require get_template_directory() . '/inc/template-functions.php'; /** * Add feature in Customizer */ require get_template_directory() . '/inc/customizer/cv-customizer.php'; /** * Custom Hooks defined */ require get_template_directory() . '/inc/custom-hooks/cv-custom-hooks.php'; require get_template_directory() . '/inc/custom-hooks/footer-hooks.php'; require get_template_directory() . '/inc/custom-hooks/header-hooks.php'; /** * Breadcrumbs files added */ require get_template_directory() . '/inc/breadcrumbs.php'; /** * Sample implementation of the Custom Header feature * * You can add an optional custom header image to header.php like so ... * * * @link https://developer.wordpress.org/themes/functionality/custom-headers/ * * @package techup */ /** * Header fearures expanded */ function techup_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'techup_custom_header_args', array( 'default-image' => get_template_directory_uri() . '/assets/images/header.jpg', 'default-text-color' => '000', 'width' => 1920, 'height' => 850, 'flex-height' => true, 'wp-head-callback' => 'techup_header_style', ) ) ); } add_action( 'after_setup_theme', 'techup_custom_header_setup' ); if ( ! function_exists( 'techup_header_style' ) ) : function techup_header_style() { $header_text_color = get_header_textcolor(); ?>

<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />
<?php echo __(" /> <?php echo __(" />