Support » How-To and Troubleshooting » Simple question about – is_page()

Simple question about – is_page()

  • Hello all!
    I’m attempting to display an image on my page depending on what page is shown. I currently have the following code:


    For some reason, it is completely refusing to work.
    Within Dreamweaver, if I take out all the img scr code, it displays no errors.

    Any suggestions? Very new to WordPress coding.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael


    Forum Moderator

    have you checked the html code in teh browser, to see if the img tags are shown?

    where are the images located/saved?

    possibly try to use absolute image paths.

    1st question : where are located your image ?

    I think this would be more correct depending where is your image but normally on your template folder :

                    <img src="<?php bloginfo('template_url'); ?>/image1.jpg">

    2nd question: do you have a link to see the pb

    Managed to fix it by placing my img src inside an echo statement:

                    echo '<img src="image1.jpg">';

    Good work Zillion.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Simple question about – is_page()’ is closed to new replies.
Skip to toolbar