WordPress.org

Ready to get started?Download WordPress

Forums

how to implement non-static pages (2 posts)

  1. mak_sim
    Member
    Posted 8 years ago #

    I'm using WordPress more like a CMS than a plain blog and I run into an interesting problem.

    I need to have "pages" that are not just a static content but include dynamic as well as other "subpages" tied together with some mod-rewrite rules. E.g. on http://www.developers.org.ua/salary-db/ there is a salary-db page as well as salary-db/data/ and salary-db/survey subpages.

    To implement those I used to create a .php file in my themes directory, add a Templage: meta-header to it then create a new page and specify that template name as a "Template". It used to work though were certainly not very clean.

    In WP2.0 subpages broke because WP very smartly (but incorrectly) set 404error status on them so I had to hack it to reset error status for certain pages.

    Is there an easier way to achieve what I want, preferably without hacking WP?

    I want just to "init" WP properly but without triggering actual output processing and then display my custom content. I have also tried this:

    if ( defined('ABSPATH') )
    require_once( ABSPATH . 'wp-config.php');
    else
    require_once('../wordpress/wp-config.php');
    @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));

    But then calling e.g. get_header() yields
    Warning: extract(): First argument should be an array in D:\Projects\www.developers.ua\www\wordpress\wp-includes\functions.php on line 2130

    Obviously, WP wasn't inited completely.

  2. justinbaeder
    Member
    Posted 8 years ago #

    Could you just use normal WP pages with a plugin like RunPHP?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags