• i was wondering how i could make all my sites pages, with the wordpress theme. What do i need to add to all the pages to make the pages have the header, footer, sidebar etc??

Viewing 8 replies - 1 through 8 (of 8 total)
  • Do you already have the static html? If so, just include wp-blog-header.php in that html file. See below.


    <?php require ('/path/to/wp-blog-header.php'); ?>
    <?php get_header(); ?>
    content goes here
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    ?>

    Or if you just starting adding the pages, you may want to make a WP Page https://codex.www.ads-software.com/Pages

    Is there a Codex article on this topic?

    Thread Starter Libby

    (@libby)

    i have already made the pages in html form (not wp pages), so i assume i just use the u gave before? thanks!

    Thread Starter Libby

    (@libby)

    sorry for the double post but it doesnt wrk see https://pastel-pixels.violet-nation.net/you.html (veiw the source and see if ive done something wrong)

    If you are using your original HTML, you only use what’s inside You have to take out everything from <html> to <body> at the top and the </body> and </html> tags in the bottom, otherwise you end up with two different headers. The balance of your stuff goes in that section where alphaoide wrote “your content goes here”.

    You need to delete:

    <html>
    <head>
    <title>Pink Poppet Ver. 4 Nyanko Bus</title>
    </head>
    <body>
    <LINK REL=stylesheet HREF="style.css" TYPE="text/css">

    (because you don’t want to use style.css, you want to use the wordpress theme).

    Also this is wrong:
    <?php require ('/wordpress/wp-content/themes/sample/header.php'); ?>
    should probably be
    <?php require ('/wordpress/wp-blog-header.php'); ?>
    as wp-blog-header.php is in your main wordpress directory. That may not get it though. In my own case, the full path would be /home/[username]/public_html/wordpress/ if I was using a directory named “wordpress”, so I suspect your full path is actually longer also. (Where username is my username on the server.)

    I also noticed just now, trying this for myself, that if the rest of the site is not in the WordPress directory, you may need to add a <base> to the header file in your theme or any links to the blog will go to the site directory instead. The downside to that is that any images in the main directory won’t show up.

    Thread Starter Libby

    (@libby)

    im quite lost right now i did that but it isnt wrkin, the path is right i think, because when i bring up the ftp ther is a folder called wordpress with all the stuf in it ( not my webpages though)

    You have an extra ?> at the end of the file. Delete that and see what happens.

    And one other problem…the file needs to be named “you.php” not “you.html”.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘adding wordpress themes to all your site..?’ is closed to new replies.