• balintfeco

    (@balintfeco)


    Hi!
    I need a little help. I have my ftp server at Square7.ch. The problem
    is if somebody visits my blog a popup window comes up. When I had my
    own HTML website I used this php code to block the popup window:

    <?php
    if (stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml"))
    {
    header("Content-type: application/xhtml+xml; charset=utf-8");
    }
    print "<?xml version='1.0' encoding='UTF-8' ?>";
    ?>

    I tried to add this code to the my WordPress template’s
    index.php/header.php file, but it throws me an error message.
    Can you tell me what I should do?
    Thanks for your help!

    Ferenc Bálint

Viewing 2 replies - 1 through 2 (of 2 total)
  • Samuel B

    (@samboll)

    what is the error message

    it seems that should work if placed in theme’s header.php before the </head>

    Thread Starter balintfeco

    (@balintfeco)

    If I paste the php code right before the </head> tag, I get this error message:
    Warning: Cannot modify header information – headers already sent by (output started at /users/balintfeco/www/blog/wp-content/themes/jarrah.1.7/jarrah/header.php:7) in /users/balintfeco/www/blog/wp-content/themes/jarrah.1.7/jarrah/header.php on line 41.

    I tried to paste the code at the beginning of the header.php, before the <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt; tag. (In the previous HTML website, it was there). But in this case I get this error message:
    This page contains the following errors:
    error on line 26 at column 13: AttValue: ” or ‘ expected
    Below is a rendering of the page up to the first error.

    And the page does not load at all.
    Any idea?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘popup’ is closed to new replies.