No, you cannot add php code into the content area (aka Write Page).
You can do 2 things:
create a Page template and put the code there, then create a new Page by using that template
or, use a plugin that allows you to run PHP in the content.
Search for runphp, phpexec, execphp and stuff like that.
2 moshu
could you explain in details what sould i do?
i undertand that i must create a template. done.
and what should i do next? how could i create a new Page by using that template??
add the php code into that template under the title of the page, then create a new page and use that for the template.
for example:
I used a template of page.php called it plugin.php
under title i added the php code i wanted to use
[code]
<h2><?php the_title(); ?></h2>
<div id="plugins">
Plugins:
<?php displayPluginsAsList(); ?>
</div>
[/code]
saved it, then created a new page, left it blank and published it.
the result is:
http://www.aleeya.net/credits/plugins/
thanks…but i didn’t understand…
look, I wan’t to use different from the whole template in my “myGallery”. I’d like to create a template page for my gallery that would differ from the template i have for my web-site, i don’t want to display some elements of design, for example heading. how could i perform my task? could i create just once a template and then use it several thousand times to add pages to my gallery using the tempalate different from the site-design? sorry for my english and non-concrete question, but i can’t explain in another words…
that is exactly what you do. you create the template you want to use. you save that as a template page in your themes directory. then, when you make a pages, you use the new theme
I’m trying to do something similar…include a gallery within a page. I got the php to run on the page, see here: http://www.divaknitting.com/blog/?page_id=334 but the problem comes when you try to click on a category. I got the page to show up by putting view.php in the blog directory but now I am at a loss as to how to get the blog to appear around it as you drill down to single pics. Any ideas?