WordPress.org

Ready to get started?Download WordPress

Forums

Intergrating WordPress Theme in Other Pages (7 posts)

  1. Egolicious
    Member
    Posted 5 years ago #

    Can anyone tell me what PHP Includes (header and footer) to use so that my WordPress theme is on all of my pages.

    I've already tried:

    <?php require_once("YOURABSOLUTEPATHHERE/wp/wp-blog-header.php");?> <?php get_header(); ? >
    //
    <?php get_footer(); ?>

    And just plain:

    <?php get_header(); ? >
    //
    <?php get_footer(); ?>

    But, those don't seem to be working. My site is http://egolicious.net and I've tried those PHP Includes on my "About" page (http://egolicious.net/about.php). It just keeps giving me this message:

    Parse error: syntax error, unexpected '/' in /home/egolicio/public_html/about.php on line 1

    And I don't know what that means =S. Please help!

  2. csleh
    Member
    Posted 5 years ago #

    Just to be clear, you are editing template files in your theme and not adding code to a Page you've posted, correct?

    The page template in your theme should already be calling for the header and footer. If it's giving you trouble, try uploading the original template file or copy the code from the single post file and edit as needed for the page.

    Posting the top portion of the page template would help.

  3. Egolicious
    Member
    Posted 5 years ago #

    No, I'm not editing template files. It's a normal PHP page with content on it. I want to know what PHP Includes to use to get my WordPress theme on that page.

  4. MichaelH
    Member
    Posted 5 years ago #

    Why not just put your content in WordPress Pages, since it looks like your site is driven by WordPress?

  5. Egolicious
    Member
    Posted 5 years ago #

    I would do that but how do you post a Page without it saying the date?

  6. MichaelH
    Member
    Posted 5 years ago #

    Well, the display of a Page is controlled by a Page Template. For instance, assuming you are using the WordPress Default Theme, and you create a Page, and use the Default Page Template, then you would edit the wp-content/themes/default/pages.php Template and delete this code:

    Posted: <?php the_time('F j, Y'); ?> at <?php the_time('g:i a'); ?>

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  7. t31os
    Member
    Posted 5 years ago #

    If you need one page without the time, then a page template is all you need, the links Michael provided should be enough...

    Unless there's some specific PHP you need to execute that WordPress won't like...

Topic Closed

This topic has been closed to new replies.

About this Topic