WordPress.org

Forums

Static Pages
Why not use a PHP code to wrap the Static Page instead on .htaccess? (5 posts)

  1. RonDsy
    Blocked
    Posted 1 year ago #

    I think it would be better to just wrap the html page inside of a WordPress page wrapper instead of fooling with the .htaccess file. Then allow WordPress to manage page permissions via a permissions plugin.

    http://wordpress.org/extend/plugins/static-pages/

  2. kpgraham
    Member
    Plugin Author

    Posted 1 year ago #

    You are right, handcrafting is always better, but I had hundreds of pages from an old website. I wrote the plugin to do the wrap automatically.

    I also used it to wrap a large archive of pdf files. The pdf files now have wordpress eadigns and sidebars - including ads with the pdf in a an iframe.

    Keith

  3. RonDsy
    Blocked
    Posted 1 year ago #

    I did not mean to hand craft, I would have liked to have seen something like this:

    <?php
    include("../../mainfile.php");
    include(WORDPRESS_PATH."/header.php");
    $wp_Option['show_rblock'] = 1;
    ?>
    - - - Page Body Here - - -
    <?php
    include(WORDPRESS_ROOT_PATH."/footer.php");
    ?>

    Ron

  4. kpgraham
    Member
    Plugin Author

    Posted 1 year ago #

    First, I would have had to write thousands of php files to warp my legacy content. Second, the plugin also iframes pdf files and other non-html files. Third, I have already written a stand-alone unit that loads a wordpress template page. You just pass it the title and content, and the unit creates a dummy wordpress page and populates it.

    You can see an example at: http://www.harpamps.com/micKamps/Dr-Z-Carmen-Ghia.html

    This is a program that reads the data from a zip file of articles and then displays it using the wordpress template. In this example, the content is displayed in the loop so wordpress treats it as a regular page. The sidebars and everything else are preserved. All plugins are loaded and the content uses all the template's css.

    Plugins are mostly used by those who can't write the php code and therefore can't use your solution.

    This plugin requires no coding except a small modification to .htaccess.

    Thanks,

    Keith

  5. RonDsy
    Blocked
    Posted 1 year ago #

    HI Keith,

    Thank you for the response. For those who do not know how to access a page header, it be best you instruct how in your docs.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.