How to create a custom page in Wordpress? [closed]

一曲冷凌霜 提交于 2019-11-30 14:56:46

问题


How can I to create a custom page in Wordpress 3.0. Give me any link of tutorial.


回答1:


WordPress provides a clever way to do this called Custom Page Templates. To create a WordPress Page Template, you’ll need to use your text editor. Go to the directory on your server where you installed WordPress, and then navigate to the directory of your theme. Usually that looks something like this: “/wp-content/themes/default” where “default” is your theme name.

That’s where you will create your custom page template file. Create a file called “cover_page.php” and add the following code to it:

 <?php
 /*
 Template Name: Cover Page
 */
 ?>

 <?php get_header(); ?>

 Here's my cover page!

<?php get_footer(); ?>  

more details read this

http://www.expand2web.com/blog/custom-page-template-wordpress/




回答2:


To add to the answers above, one good way is to open a text editor (I like notepad++) and copy and paste the content of the page.php file into a new file, including the php template name code in one of the previous examples.

Call it something unique (like custom_page1.php ) and upload this file via ftp to your active theme folder inside your wordpress install on your server. You can use filezilla for this or another FTP program.

Refresh your editor page in wordpress and you should see your template listed with the others on the right.

Now when you publish a page you can choose this template from the dropdown menu on the side panel.




回答3:


You can use the Page Template feature of wordpress to create a custom page.




回答4:


  1. First create page using pages->add new.Then,give title (for e.g. aboutus). Then click
    Publish on right side of the window(no content is needed for the custom page).
  2. Then,on left side of window click Appearance->Menus.
  3. In menus window,on left side you will see Pages heading,in that click Most Recent and
    check aboutus page. Then it will be shown on right side window.
  4. Then,on left above Pages heading, you will see Custom Links, in that enter # in URL textbox and aboutus in Label textbox. Then click Add to Menu button.
  5. Done. You will see the menu as custom on right side of the window and then click save menu button at the bottom right.
  6. Then to check, on left top of the window click the website or your blog name. You will see the menu. Click on it. No changes will occur.

That's it, done!




回答5:


Here are some plugins you can use while creating what you need then you can turn them off or remove them.

http://wordpress.org/extend/plugins/theme-file-duplicator/
http://wordpress.org/extend/plugins/theme-file-maker/

Very easy way to do what you need.




回答6:


This is a very simple part of WordPress theme development, I suggest giving the documentation (the WordPress Codex) a good read before going any further. There are also a tonne of great WordPress tutorial sites out there that will get you heading in the right direction.



来源:https://stackoverflow.com/questions/9531559/how-to-create-a-custom-page-in-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!