Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is this even possible? I mean, im trying to add a blog into my site.. I already have the header,footer and sidebar layout in my site. can i use those in my custom wordpress template?

<?php
/*
Template Name: Blog
*/
?>
<?php include( PATH . 'http://www.mysite.com/includes/header.php' );  ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  <h2><a href="<?php the_permalink() ?>">
    <?php the_title(); ?>
    </a></h2>
  <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
  <div class="entry">
    <?php the_content(); ?>
  </div>
  <div class="postmetadata">
    <?php the_tags('Tags: ', ', ', '<br />'); ?>
    Posted in
    <?php the_category(', ') ?>
    |
    <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
  </div>
</div>
<?php endwhile; ?>
<div class="mypagination">
  <?php include (TEMPLATEPATH . '/inc/nav.php' ); ?>
</div>
<?php else : ?>
<h2>Not Found</h2>
<?php endif; ?>
<?php include( PATH . 'http://www.mysite.com/includes/sidebar.php' );  ?>
<?php include( PATH . 'http://www.mysite.com/includes/footer.php' );  ?>

I also tried..

<?php include('http://mywebsite.com/includes/header.php'); ?>

share|improve this question
Take a look at codex.wordpress.org/Integrating_WordPress_with_Your_Website should answer your question. – Mark Davidson Aug 26 at 7:37
1  
You can use it. What's the problem are you facing? – Vinod Dalvi Aug 26 at 7:39
hi, i just copied my files inside the wordpress folder and linked them properly.. anyway, whats the answer on this question? I just get a blank white page – Jeremi Liwanag Aug 26 at 14:07

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.