Support » Themes and Templates » Theme/template use for this case?

  • Resolved sepehr125


    Hello all,

    I want to have three or four pages on my site be word-press powered blogs. I won’t be needing comments or anything; wordpress would just be a simple backend for my client. Currently, WP is installed in a directory in the site’s root called wordpress. The other pages, which would be pulling posts based on category from the wordpress directory, are sibling directories to wordpress.
    I’ve been trying this method:

    In the main content div of, I have the following tentative code:

    <?php define('WP_USE_THEMES', false); get_header(); ?>

    $posts = get_posts('numberposts=10&order=ASC&orderby=post_title');
    foreach ($posts as $post) : start_wp(); ?>
    <?php the_date(); echo "
    "; ?>
    <?php the_title(); ?>
    <?php the_excerpt(); ?>

    but am receiving fatal error

    Fatal error: Call to undefined function get_header() in /home/mepkin/www/www/news/blog.php on line 58.

    How can I make the path to get_header work in this situation?

    Would other functions and The Loop work in this situation? Could I get a sidebar for, say, archives, pulled in for specific categories, etc. using the above method?

    If I use a theme that mimics my site’s design and templates that pull the right data based on category, what would the URLs look like? Would they all be in the directory WordPress?

    Any and all advice would be much appreciated.



Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme/template use for this case?’ is closed to new replies.