• I’d like to know if I can use my own pages with wp 1.5? I’ve tried searching the codex + web but so far I have nothing. I’m gonna use a header image which includes image map so I’m not gonna use the “add pages” thingie from WP admin cp. I’ve already coded my own sites (20+) which I want to include with my blog. So how do I do that? I’ve usually used the “including” header.php & footer.php.. but I guess I can’t use that in this one? or can I? Any help will be appreciated!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Probably you can link it? I’m not quite sure how you wanted your site to be displayed by WP.

    You can simply add your own static linklist in the sidebar (sidebar.php) or wherever you want it.

    My blog, https://kickasswebdesign.com/wordpress/
    has two links added as static links at the top of my links. These links were added by me to php file that generates that section of the page. One of the links is “home” and the other is “bloghome”. Is this the kind of thing you had in mind?

    Thread Starter belewien

    (@belewien)

    I want to do a personal site which includes my blog + other pages including info about me, gallery, fanlistings and so on. I have a single layout (selfmade/altered theme for WP 1.5.) and I want to use that same layout for my non wordpress pages . How do I include that theme/layout for the non wordpress pages, so that the sitebar (with the archives, blogroll etc) is visible also on those non wordpress pages also?
    What part of the code do I have to include on those pages?

    If the theme you use has all the css in one file it’s pretty simple to create your static pages using that css file, to carry the same look throughout your site, but you’d have to create these pages yourself. My site has static and blogged pages that match when the rare event occurs that my own default template that matches my site is active. However, if you want the dynamic stuff added, like the blogroll and linklists, the pages have to be done through WordPress as WordPress Pages. I don’t think you can call a “part” of wordpress, it’s all integral, though someone a bit more php literate might say I’m wrong.

    Here’s what I’ve done…
    I make up the pages in my editor following the theme’s layout but give the page a “template header” like this.

    <?php
    /*
    Template Name: Whatever Page Name You Want
    */

    Then follow the theme layout:

    get_header;
    get_sidebar;
    <div id="content"
    place content here using any HTML, php, WP tags
    </div>
    get_footer;
    ?>

    Then go into admin and create a new page choosing the above as the page template. Don’t put any content here. Leave the edit window blank. The content goes in when you make the page in your editor (above).

    Save the page. WP assigns it an ID number. Use the ID number in a link on your sidebar or whatever like this:

    <a href="<?php echo get_settings('siteurl'); ?>/index.php?page_id=nn">Link Text</a>

    Hope I explained this so you get the idea.

    I’ve also done this on my site (click my name here).
    When my blog design was done I just took the code of the index.php from my theme and left the template tags I needed; deleted the rest of the template tags and replaced them with my static content.
    In order to make these (.php) pages WP aware you have to put at the very top – before everything – the following lines:
    <?php
    define('WP_USE_THEMES', true);
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    If you are not using the same css from the theme – make it “false”.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to include own pages to wp (not made via admin cp!)’ is closed to new replies.