문제

(Moderator's note: This question was previously titled "How to add multiple custom page in wordpress")

I am developing a WordPress site and right now I have a custom home page and others are default WordPress pages. Now I want to add one another custom page for some landing page. It will not be sub-page. This page's layout & design is different. How Can I add this to my wordpress website?

도움이 되었습니까?

해결책

Sounds like what you want is a Custom Page Template It's quite simple, if you want to call your layout "My Special Layout" just create a file in your Theme Directory calling it whatever you like (I'd call it "page-my-special-layout.php" but that's not required) and add the following comment to the top of the template file:

<?php
/*
Template Name: My Special Layout
*/

After the comment put in whatever HTML you need to design your desired page.

Then once you have the Template in your Theme directory and you load the Page Editor in the WordPress admin console you'll be given the option to assign it as your Page Template; simple as that:

WordPress Page Editor with Page Template Selection Highlighted

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top