简体   繁体   English

在WordPress中启用永久链接页面

[英]Enabling permalink pages in WordPress

I'm using <a href="<?php the_permalink();?>" Take me to another page </a> to take the user to a permalink page. 我正在使用<a href="<?php the_permalink();?>" Take me to another page </a>将用户带到一个永久链接页面。

However, when I do, it is saying No input file specified. 但是,当我这样做时,它表示未No input file specified.

I have the following files in theme folder: 我的主题文件夹中有以下文件:

footer.php
functions.php
header.php
style.css
index.php

How come this is not working — am I missing another php template file? 为什么这不起作用-我是否缺少另一个php模板文件?

Your template files have to be in a directory under /wp-content/thmes/your-theme/. 您的模板文件必须位于/ wp-content / thmes / your-theme /下的目录中。 After you inserted them into the theme dir you have to activate your theme in the wordpress administration. 将它们插入主题目录后,您必须在wordpress管理中激活主题。

You need also at least a index.php File. 您还至少需要一个index.php文件。 That's the file where you place the functions for your content. 那就是放置内容功能的文件。 In the index.php your include the header.php and footer.php with the Wordpress functions get_header() and get_footer(). 在index.php中,包含带有WordPress函数get_header()和get_footer()的header.php和footer.php。

I think you should better read the Documentations: 我认为您最好阅读以下文档:

http://codex.wordpress.org/Using_Themes http://codex.wordpress.org/Using_Themes

http://codex.wordpress.org/Theme_Development http://codex.wordpress.org/Theme_Development

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM