• contemporu

    (@contemporu)


    I have installed the Exec PHP plugin, which allows me to execute PHP script on specific pages or posts on my wordpress site.

    However, it doesn’t work because when I type in a script like this:

    <?php if (!is_paged()) { ?>
    <img src=”http://theinternetmarketingtools.com/wordpress/wp-content/uploads/Internet-Marketing-Tools-Start.jpg”/&gt;
    <?php } ?>

    It automatically adds spaces and chances <?php blah balh balh into…
    < ?php

    How can I stop WordPress from auto adding these spaces, which obviously makes my PHP script not work?

    I even deactivated all other plugins to see if there was a conflict, but WP still adds the spaces.

Viewing 3 replies - 1 through 3 (of 3 total)
  • esmi

    (@esmi)

    Try adding the code to a custom template instead.

    Thread Starter contemporu

    (@contemporu)

    I’m not sure what that means?

    What I want is to have an image appear at the top of the first page of my blog only, but not for page 2 and on.

    esmi

    (@esmi)

    Add the code to your theme’s index.php file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why is WP automatically adding spaces to my code in HTML editor?’ is closed to new replies.