Forums

[resolved] No HTML code being displayed after Wordpress (2 posts)

  1. all2humanuk
    Member
    Posted 1 month ago #

    I'm wondering if anyone has come across this issue before. I am looking at a site for a company I recently started working for. They are using Word Press on the first page to post race stories unfortunately I have no experience of Word Press.

    They are including the Word Press articles in the page by using this PHP

    define('WP_USE_THEMES', TRUE);
    include('./wp-blog-header.php');

    Anyway the weird part is any HTML, in fact any code that I write below the Word Press never makes it into the code in the rendered page. It's almost as if Word Press eats my code. I think that the person who originally setup this site knew there was a problem as he placed part of his HTML into the Word Press footer.

    Has anyone ever seen this kind of thing before? Any clues as to why this is happening?

  2. Otto42
    Moderator
    Posted 1 month ago #

    If you're using an older version of WordPress, then yes, this will be the case. Older versions of WordPress called the exit() function in template-loader after they displayed the page. Newer versions return properly.

    Upgrade.

Reply

You must log in to post.

About this Topic

Tags