#494 closed enhancement (wontfix)
PHP in Static Pages
Reported by: | orangenormal | Owned by: | matt |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 1.5 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
It should be possible for advanced users to include PHP and WordPress functions in their static pages.
Currently, it's impossible to easily create a separate "Archives" page, for example, which lists all the available posts under monthly headings.
Creating a specialized (and separate) PHP page is inappropriate, since it doesn't integrate with WordPress' Theme and Template support.
Change History (7)
#3
@
20 years ago
Might be worth including one of the plugins with WP or rolling it into core. Setting up a "contact" page or "archives" page is a fairly common thing, and right now you have to go hunting for a plugin.
#4
@
20 years ago
- Patch set to No
- Resolution changed from 10 to 70
The current support for themes includes support for such pages, such as archives pages. Advanced users can also make use of wp's authentication functions.
Please verify this.
Also, including dynamic php code in a page would mean the page is no longer 'static'.
#5
@
20 years ago
The problem with using Theme templates to create such pages is that it then becomes theme-specific. If WordPress and other PHP functions were allowed to be inserted into pages easily, you could make an archives page that would be Theme-independent (the page would still display properly if you switch themes).
2fargon, I think you know full well that "static" pages aren't termed as such because they're forbidden from having any dynamic properties. ;)
The fact is this sort of functionality is commonly desired. WP should support it out of the box. (A simple checkbox perhaps?)
#6
@
20 years ago
- Owner changed from anonymous to matt
- Resolution changed from 70 to 90
- Status changed from new to closed
I would recommend either creating a special template for that page (every page can have its own template if you want) or using a plugin like RunPHP:
http://www.nosq.com/technology/2004/10/runphp-wordpress-plugin/
Plugins are available that interpret PHP in posts.