Forums

Create WP page without theme (14 posts)

  1. mrosarionyc
    Member
    Posted 3 years ago #

    Hello. I am looking to create internal pages through WP that I can password protect but do not want them to show with my current theme. in fact, i don't want them to show with any theme. Is that possible? Just plain pages...

    also... is there a way to add custom admin pages to WP?

  2. Otto
    Tech Ninja
    Posted 3 years ago #

    Custom Page Templates in your theme can let a Page look like anything you like.

    http://codex.wordpress.org/Pages#Page_Templates

  3. mrosarionyc
    Member
    Posted 3 years ago #

    interesting.. the only problem is that i have created four different themes and when i go to pick a template for that specific page, it only gives me "default," "archives," and "links" in the drop down, it does not show any of the ones i have created...

  4. Otto
    Tech Ninja
    Posted 3 years ago #

    If you're creating these on Windows, make sure you're using the right style of line breaks, or when you FTP them to your site, make sure they're transferred in text mode and not binary mode.

    Page Templates not showing up is often an incorrect line break style issue.

  5. mrosarionyc
    Member
    Posted 3 years ago #

    well, they do show in my regular template page.... no idea why they won't show in this dropdown menue

  6. Otto
    Tech Ninja
    Posted 3 years ago #

    That's sorta my point. If they have the wrong linebreak style, then they won't show up in the dropdown menu.

  7. chanel
    Member
    Posted 3 years ago #

    Add this to the top of the .php page you created:

    <?php
    /*
    Template Name: The Page Name Here
    */
    ?>

    Upload it to your theme that you are currently using folder and then when you create a page, it should now show up in the dropdown.

  8. mrosarionyc
    Member
    Posted 3 years ago #

    wow, thanks this is exactly what i needed. now i am encountering a problem... the WP that I just created is having problems with display php codes... i'm going to search on here on how to include php codes into WP pages... thanks!!!

  9. chanel
    Member
    Posted 3 years ago #

    That's interesting, being that WP is for php codes.

  10. mrosarionyc
    Member
    Posted 3 years ago #

    yea i thought it would work but it doesn't.... i am including a PHP script within the content of the page, and some iframes and the page shows blank

  11. mrosarionyc
    Member
    Posted 3 years ago #

    hmmm actually, now that i look at it not only is the page removing some php elements and messing up my code, the theme that u suggested that i create...

    <?php
    /*
    Template Name: The Page Name Here
    */
    ?>

    is the one not showing the contents of the page... when i pick my other templates, this page shows, with all the php code broken but it shows... when i select the plain template it shows nothing...

  12. chanel
    Member
    Posted 3 years ago #

    I can only give you an example of what i did to create my own php page template. I'm on WordPress 2.7 and the theme i am using is Zindi.

    I wanted a page listing all the other pages I created and posted on my site. So...I opened up Notepad and pasted these contents in there:

    <?php
    /*
    Template Name: Writings
    */
    ?>

    <?php get_header(); ?>

    <div id="side-left">
    <div id="content">

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="kutu">
    <div class="ust"><span></span></div>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2 class="pagetitle"><?php the_title(); ?></h2>
    After having a blog for a few years, I've had over 300 blog entries. Some of those entries effected my readers deeply. Here are those entries and a small collective of

    some of my best work.

    <div class="entrytext">
    <?php
    if($post->post_parent)
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
    else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
    if ($children) { ?>

      <?php echo $children; ?>

    <?php } ?>

    </div>

    </div>
    <?php endwhile; endif; ?>
    <?php edit_post_link('Edit this entry.', '<p style="margin:10px;">', '</p>'); ?>
    <br class="clear" />
    <div class="alt"><span></span></div></div>
    </div>

    </div>
    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    I saved it as "writings.php" and uploaded it to my theme folder. I am using a theme called Zindi so the file path was /wp-content/themes/zindi which is where I can find all of my other page templates. I then went into "Appearance > Themes > Editor" just make sure it's there. I clicked on "writings.php" to verify the coding is intact. When you do this, you will not see:

    <?php
    /*
    Template Name: Writings
    */
    ?>

    So I then went to Page > Add New. I didn't type anything in the textarea. All I did was select the Writings template (towards the right there should be a dropdown called Template) and hit save.

    Here's the url to my results: http://chanellie.com/?page_id=8

  13. mrosarionyc
    Member
    Posted 3 years ago #

    ah! got it... i left out a few tags.... now it displays but still can't get the php contents to show correctly.. great looking page btw....

  14. chanel
    Member
    Posted 3 years ago #

    thanks! I learned most of my php by reading these threads. It's my main source of WordPress tweeking.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags