Hi,
in 1.5 you can just add new pages in the admin section Manage /Pages
Regards
Adi
Yes, but how do you make them appear on the site? I’ve been wondering this myself.
Ah, I’ve discovered that you can use the wp_list_pages tag to do that:
http://codex.wordpress.org/Template_Tags/wp_list_pages
However, as you can see on my site (http://neekole.com), the “test” link goes to neekole.com/test, which doesn’t seem to exist. Is there something I need to do with my .htaccess file?
Hi,
you can always call a single post and a static page like this index.php?pagename=[POST_SLUG]. If you are using nice permalinks (activate under options /permalinks ) then you need to update your .htaccess or have WP update the .htaccess if it is writable.
Regards
adsworth
yeah, I understand that. But I cant add php includes to the page files.
index.php?page_id=23 would be the way to call a single page.
If you want to include php, look in the plugin section. There is a plugin that will allow you to include php-code in posts.
Hi 7milesdown,
you can solve that using this neat plugin: http://www.nosq.com/technology/2004/10/runphp-wordpress-plugin/
Regards
Adi
Depending on what exactly you want to do (i.e. where you want to include php code), you can also do the following.
- Create a new file (or copy
page.php or something similar to a new file) called snarfer.php.
- Insert the following at the top of the file.
<?php
/*
Template Name: Snarfer
*/
?>
- Insert whatever php you need in your new snarfer.php.
- Write a new Page in Write->Page making sure to select “Snarfer” from the “Page Template” dropdown (below the content editing textbox).
You now have a page which, instead of looking to page.php (or index.php if you don’t have a page.php) for its template, looks to snarfer.php.
Hi,
now that’s a neat trick. π
I presume the snarfer.php file belongs in the theme directory?
Regards
adsworth
Yup. The same directory as whatever theme you’re using for the rest of the site.
(Not the “theme” directory but the theme’s directory :) )