// enqueue file function custom_enqueue_styles() { wp_enqueue_style('lightgallery', 'https://cdnjs.cloudflare.com/ajax/libs/lightgallery/1.2.21/css/lightgallery.min.css', array(), '1.2.21'); wp_enqueue_style('slick-theme', get_template_directory_uri() . '/css/slick-theme.css', array(), null); wp_enqueue_style('slick', get_template_directory_uri() . '/css/slick.css', array(), null); wp_enqueue_style('main-style', get_template_directory_uri() . '/css/style.css', array(), null); } add_action('wp_enqueue_scripts', 'custom_enqueue_styles'); function custom_enqueue_scripts() { wp_enqueue_script('main-jquery', get_template_directory_uri() . '/js/jquery.js', array('jquery'), null, true); wp_enqueue_script('lightgallery', get_template_directory_uri() . '/js/lightgallery.js', array('jquery'), null, true); wp_enqueue_script('isotope', get_template_directory_uri() . '/js/isotope.js', array('jquery'), null, true); wp_enqueue_script('slick', get_template_directory_uri() . '/js/slick.min.js', array('jquery'), null, true); wp_enqueue_script('custom-js', get_template_directory_uri() . '/js/custom.js', array('jquery'), null, true); } add_action('wp_enqueue_scripts', 'custom_enqueue_scripts'); // enqueue file // custom menu function my_custom_menu() { register_nav_menus( array( 'header-menu' => _('Header Menu'), 'footer-menu' => _('Footer Menu') ) ); } add_action('init', 'my_custom_menu'); // custom menu // custom logo function custom_theme_logo_setup() { add_theme_support('custom-logo', array( 'height' => 100, 'width' => 250, 'flex-height' => true, 'flex-width' => true, 'header-text' => array('site-title', 'site-description'), )); } add_action('after_setup_theme', 'custom_theme_logo_setup'); function custom_theme_customizer($wp_customize) { $wp_customize->add_setting('secondary_logo'); $wp_customize->add_control(new WP_Customize_Image_Control( $wp_customize, 'secondary_logo', array( 'label' => __('Secondary Logo', 'your-textdomain'), 'section' => 'title_tagline', 'settings' => 'secondary_logo', ) )); } add_action('customize_register', 'custom_theme_customizer'); // custom logo // custom post type services function custom_services_post_type() { $labels = array( 'name' => __('Services', 'your-text-domain'), 'singular_name' => __('Service', 'your-text-domain'), 'add_new' => __('Add New', 'your-text-domain'), 'add_new_item' => __('Add New Service', 'your-text-domain'), 'edit_item' => __('Edit Service', 'your-text-domain'), 'new_item' => __('New Service', 'your-text-domain'), 'view_item' => __('View Service', 'your-text-domain'), 'search_items' => __('Search Services', 'your-text-domain'), 'not_found' => __('No services found', 'your-text-domain'), 'not_found_in_trash' => __('No services found in Trash', 'your-text-domain'), 'parent_item_colon' => __('Parent Service:', 'your-text-domain'), 'menu_name' => __('Services', 'your-text-domain'), ); $args = array( 'labels' => $labels, 'description' => __('A custom post type for services.', 'your-text-domain'), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array('slug' => 'services'), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 5, 'supports' => array('title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'), 'taxonomies' => array('category', 'post_tag'), ); register_post_type('services', $args); } add_action('init', 'custom_services_post_type'); // custom post type services // options page if (function_exists('acf_add_options_page')) { acf_add_options_page(array( 'page_title' => 'Theme General Settings', 'menu_title' => 'Theme Settings', 'menu_slug' => 'theme-general-settings', 'capability' => 'edit_posts', 'redirect' => false )); acf_add_options_sub_page(array( 'page_title' => 'Theme Header Settings', 'menu_title' => 'Header', 'parent_slug' => 'theme-general-settings', )); acf_add_options_sub_page(array( 'page_title' => 'Theme Footer Settings', 'menu_title' => 'Footer', 'parent_slug' => 'theme-general-settings', )); } // options page