Support » How-To and Troubleshooting » Theme is being injected into my markup

Theme is being injected into my markup

  • This is a bizarre issue…
    I’ve set up WordPress in its own directory and followed the Codex documentation on giving WordPress its own directory. I’ve set it up normally otherwise.
    My blog page (called blog.php) has all the code required to make WP work. However, when I view the page, this happens:


    Excuse the text, it’s mostly filler.

    I have set WP_USE_THEMES to false, I have require('./wordpress/wp-blog-header.php'); and get_header(); at the top of my page.
    The loop is as follows:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h2><?php the_title(); ?> <span class=\"author\">by <?php the_author(); ?> on <?php the_date(); ?></h2>
    <?php the_content ?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>";

    I have no idea what is going on here or how to remedy it. Hopefully someone here knows how to deal with this…?

    Note that I can’t provide a link to the page as I’m currently running it using XAMPP on localhost.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Since you say that the “Theme is being injected into my markup”, I assume the problem is that the theme header is showing up on top of your content? get_header() is going to pull in the theme’s header. That is why you see the theme header.

    I thought get_header was required in any case… Well, you learn something new every day. I’ll have a tinker once I get back to my PC.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme is being injected into my markup’ is closed to new replies.