Forums

One of my posts is displayed as html code in firefox (7 posts)

  1. Solas
    Member
    Posted 3 years ago #

    Hi,

    I set about using wordpress as a CMS about a month ago. This is working fine on pages such as http://www.seckoukeita.com/news

    But when I tried to add a new post is is displayed as html code in firefox here - http://www.seckoukeita.com/drumming

    Does anyone know what would cause this or how to rectify it?

    Thanks
    James

  2. iridiax
    Member
    Posted 3 years ago #

    The page content type is text/plain, which is why it displays as code text. How did you make or upload this page?

  3. Solas
    Member
    Posted 3 years ago #

    Hi Iridaix, thanks for the response.

    I generated the page by making a new post in the control panel, as usual.

    I see the below in the rendered page:
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

    How can you tell that it's content type is text/plain?

  4. Solas
    Member
    Posted 3 years ago #

    2 weeks on and I'm still completely stuck with this. Can anyone help me please?

  5. Solas
    Member
    Posted 3 years ago #

    Any new posts now render correctly, it seems like it's just this one that doesn't work

  6. Otto
    Tech Ninja
    Posted 3 years ago #

    How can you tell that it's content type is text/plain?

    The headers returned are text/plain, regardless of what the meta tag says.

    Do you have a file on the system named "drumming" or something else? Or a caching system or something? It doesn't look like this content is being generated by WordPress to me. It comes back far too quick, like it's static somewhere.

  7. chaoskaizer
    Member
    Posted 3 years ago #

    that is pretty weird behavior. The correct link suppose to be at http://seckoukeita.com/drumming.php was it?

    if the page still render in plain-text you might want to add the below code inside your header.php (top most at line 1)

    <?php if (stristr($_SERVER["HTTP_ACCEPT"],get_bloginfo('html_type') )  ) {
     header('Content-Type:'.get_bloginfo('html_type').'; charset='.get_bloginfo('charset')  );
    } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic