美文网首页
wordpress主题开发:主题文件构成

wordpress主题开发:主题文件构成

作者: ozil_oo | 来源:发表于2018-06-26 12:01 被阅读0次

    主页文件(至少有一个,优先home.php)

    1.home.php
    2.index.php

    style.css(必须项)

    主样式表,包含你主题的信息头,必须在根目录。

    /*
    Theme Name: Twenty Seventeen
    Theme URI: https://wordpress.org/themes/twentyseventeen/
    Author: the WordPress team
    Author URI: https://wordpress.org/
    Description: Twenty Seventeen brings your site to life with immersive featured images and subtle animations. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
    Version: 1.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Text Domain: twentyseventeen
    Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
    This theme, like WordPress, is licensed under the GPL.
    Use it to make something cool, have fun, and share what you've learned with others.
    */
    

    comments.php

    评论模板

    文章页

    1.single-{post_type}.php 如果文章类型是videos,wordpress就查早single-videos.php
    2.single.php
    3.index.php

    相关文章

      网友评论

          本文标题:wordpress主题开发:主题文件构成

          本文链接:https://www.haomeiwen.com/subject/iempyftx.html