开发者

How do I create and link Pages in Wordpress? (not the Pages that can be created inside the Wordpress Admin)

I would like to create a fully functional page within my WordPress application (which will have jQuery and other stuff). The problem is that when I create a file within my theme/starkers (I'm using the Starkers Theme) directory let say about.php the following links (in my index.php) don't work:

<li><a href="<?php bloginfo('template_directory'); ?>/about.php">About</a></li> <-- Fatal error: Call to undefined function get_header() 
<li><a href="about.php">About</a></li> <-- site not found

What's the best way of doing this becasue I think I can't add PHP and jQuery and other complex stuff inside the Pages that can be created in Wordpress Ad开发者_运维问答min.

Any suggestions?


What's the best way of doing this becasue I think I can't add PHP and jQuery and other complex stuff inside the Pages that can be created in Wordpress Admin.

Why not? Just make a custom page template inside your theme, create a new page on your wp-admin, and assign that custom page template for your page. You should be able to customize that as much as you want.

Try a scan here : Wordpress Template Hierarchy : Pages


Try loading

require( '/path/to/your/wordpress/wp-load.php' );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜