• Resolved Jonathon N

    (@imagiscapeca)


    This works:
    <?php include(TEMPLATEPATH.’/content.php’); ?>

    This produces a ton of gobbledygook on the webpage:
    <img src=”<?php include(TEMPLATEPATH.’/images/hr.gif’); ?>” />

    So does this:
    <?php include(TEMPLATEPATH.’/images/hr.gif’); ?>

    What can I do besides entering the full https://&#8230; url?

    This seems to work sometimes, I think:
    <?php include(‘wp-content/themes/mytheme/images/hr.gif’); ?>

    This seems to work sometimes, I think:
    <?php include(‘images/hr.gif’); ?>

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

    (@whooami)

    <img src="<?php include(TEMPLATEPATH.'/images/hr.gif'); ?>" />

    you cannot use a php include to call an image file.

    thats NEVER going to work.

    Maxaud

    (@maxaud)

    what about:
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/me.jpg" alt="picture of me" />

    Thread Starter Jonathon N

    (@imagiscapeca)

    Thanks both –
    so php includes don’t work,
    but
    <img src="<?php bloginfo('stylesheet_directory'); ?>/images/hr.gif" alt="test">
    does work.

    It works for iframes too!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘img src= ?php include TEMPLATEPATH… gets big mess’ is closed to new replies.