<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                無論是直接使用插件,還是參考代碼,Custom Post Type UI都很有參考作用,下載鏈接: https://wordpress.org/plugins/custom-post-type-ui/ 在functions.php上加入以下代碼: ~~~ // custom post type function awesome_custom_post_type(){ $labels = array( 'name' => 'Porfolio', 'singular_name' =>'Portfolio', 'add_new' => 'Add Item', 'all_items' => 'All Items', 'add_new_item' => 'Edit Item', 'new_item' => 'New Item', 'view_item' => 'View Items', 'search_item' => 'Search Portfolio', 'not_found' => 'No items fouond', 'not_found_in_trash' => 'No items found in trash', 'parent_item_colon' => 'Parent Item' ); $args = array( 'labels' => $labels, 'public' => true, 'has_archive' => true, 'publicly_queryable' => true, 'menu_icon' =>'dashicons-welcome-write-blog', 'query_var' => true, 'rewrite' => true, 'capability_type' => 'post', 'hierarchical' => false, 'support' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'revisions', ), 'taxonomies' => array('category', 'post_tag'), 'menu_position' => 5, 'exclude_from_search' => false ); register_post_type('portfolio', $args); } add_action('init','awesome_custom_post_type'); ~~~ admin界面會多出和文章一樣格式的Porfolio(作品): ![](https://box.kancloud.cn/53e76d3218c9bc039fb7bf57b1f4509b_423x237.png) 創建一個專頁來顯示作品集: 創建page-portfolio.php,加上以下代碼: ~~~ <?php /* * Template Name: Portfolio Template */ ?> <?php get_header(); ?> <?php $args=array('post_type' => 'portfolio', 'post_per_page' => 3); $loop=new WP_Query($args); if($loop->have_post()): while(have_posts()): the_post(); ?> <?php get_template_part('content', 'archive'); ?> <?php endwhile; endif; ?> <?php get_footer(); ?> ~~~ 在創建的頁面上,選擇Portfolio Template作為頁面模板。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看