• With the new themes in 1.5 its very easy to have true static pages like https://domain.com/static.php (and theme independent assuming your theme has a header and a footer), you can also edit them through the admin interface Manage – Files -> :

    <?php
    require(‘./wp-blog-header.php’);
    $themes = get_themes();
    $current_theme = get_current_theme();
    $current_template_dir = $themes[$current_theme][‘Template Dir’];
    include($current_template_dir . “/header.php”);
    ?>

    PUT YOUR STATIC CONTENT HERE

    <?php include($current_template_dir . “/footer.php”); ?>

Viewing 4 replies - 16 through 19 (of 19 total)
  • i tried that code above and it didn’t show the entire theme, and the sidebar is not where its suppose to be is there additional coding necessary ?

    is it possible to create pages using wp-admin that will not show up in the page list on the sidebar ?

    to clarify, if i already have a page list of 3 pages and i want to make page 4 and 5 without showing them in the list

    is this possible ?

    Sure! Exclude the pages you don’t want in the call to wp_list_pages (in the sidebar), like wp_list_pages(‘exclude=17,38’), where 17 and 38 are the IDs of the pages you want to exclude.

    See https://codex.www.ads-software.com/Template_Tags/wp_list_pages

    Regards

    Here’s a rather odd request, not sure if its possible,

    I understand how the code above works for static pages, it pulls in the header/footer works great

    How would it work if i only wanted to pull in only some of the header/footer ?

    I’m assuming i would need header2.php, footer2.php I think and then like the code above how could i make a static page that would pull only the header/footer from this set ?

    this reason i ask this is because i’ll be making an additional set of static pages that share some of the regular layout but not all

    if i can do it all form the wordpress that would be most excellent ??

    revised: just answered my own question, the above thought actually works

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘True Static Pages’ is closed to new replies.