Code Tổ chức sự kiện – Function.php

File Functionon:
<?php

add_action(‘after_setup_theme’, ‘innocom_theme_setup’);

function innocom_theme_setup() {
        define( ‘WP_POST_REVISIONS’, 10 );
        /* Add Product Type – Product Taxonomony */
        //include_once( ‘admin/post-type/gallery.php’ );
        //include_once( ‘admin/post-type/logo.php’ );
        //include_once( ‘admin/post-type/testimonial.php’ );
       
        //include_once( ‘admin/taxonomony/product-taxonomony.php’ );
        include_once( ‘admin/cs-framework.php’ );
        include_once( ‘admin/admin.php’ );
        include_once( ‘admin/widget.php’ );
        include_once( ‘admin/style.php’ );
        include_once( ‘admin/post-type/event.php’ );
        include_once( ‘admin/post-type/gallery.php’ );
        include_once( ‘admin/post-type/staff.php’ );
        include_once( ‘admin/post-type/testimonial.php’ );
        include_once( ‘admin/taxonomony/gallery-cat.php’ );
        include_once( ‘admin/taxonomony/event-cat.php’ );

        include_once( ‘shortcode/about.php’ );       
        include_once( ‘shortcode/service.php’ );
        include_once( ‘shortcode/event.php’ );
        include_once( ‘shortcode/gallery.php’ );
        include_once( ‘shortcode/testimonial.php’ );
        include_once( ‘shortcode/staff.php’ );
        include_once( ‘shortcode/partner.php’ );
        include_once( ‘shortcode/booking.php’ );
        include_once( ‘shortcode/subscribe.php’ );
        //require_once get_template_directory_uri() .’/cs-framework/cs-framework.php’;

        //$language_folder = THEME_URL . ‘/languages’;
        load_theme_textdomain (‘innocom’, get_template_directory() . ‘/languages’);

        /* hiển thị post format
        https://codex.wordpress.org/Post_Formats
        */
        add_theme_support(‘post-formats’, array(
                ‘image’,
                ‘video’,
                ‘link’,
                ‘gallery’,
                ‘quote’,
                ‘audio’,
                ‘status’,
                ‘chat’,
                ‘aside’
            ) );

        /* Tự động iển thị title trên tài liệu HTML xuất ra */
        add_theme_support(‘title-tag’);

        /* Cho phép thumbnails */
        add_theme_support(‘post-thumbnails’, array( ‘post’, ‘page’,’inno-event’,’inno-gallery’,’inno-staff’, ‘inno-testimonial’ ));

        /* Thêm menu */
        register_nav_menu(‘primary-menu’, __(‘Primary Menu’, ‘innocom’));

        /* Tại sidebar */
        $sidebar = array(
            ‘name’ => __(‘Main Sidebar’, ‘innocom’),
            ‘id’ => ‘main-sidebar’,
            ‘description’ => __(‘Default sidebar’),
            ‘class’ => ‘main-sidebar’,
            ‘before_title’ => ‘<h3 class=”widgettitle”>’,
            ‘after_title’ => ‘</h3>’
        );
        register_sidebar( $sidebar );
}

Leave a Reply

Your email address will not be published. Required fields are marked *