drrqwokuz71031449 2014-07-14 09:25
浏览 32
已采纳

如何添加新的页面模板到Wordpress模板下拉列表

I hope someone might be able to help me with this. I have had a new page template built for a wordpress website and have uploaded it to the theme folder. However can someone tell me how to add that page template to the drop down menu in the page editor so it can be selected.

Many Thanks

  • 写回答

1条回答 默认 最新

  • dongshou6041 2014-07-14 09:28
    关注

    You'll need to add this snippet to the very top of the file.

    <?php
    /*
    Template Name: Put Your Template Name Here
    */
    ?>
    

    Ref: http://codex.wordpress.org/Page_Templates#Custom_Page_Template

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?