• Resolved Skyforger

    (@skyforger)


    I created a custom page defined it with

    <?php
    /*
    Template Name: Snarfer
    */
    ?>

    but it won’t show the picture i got there. Here is my full code

    [code moderated as per forum rules - please use the pastebin]

Viewing 6 replies - 1 through 6 (of 6 total)
  • In what directory is your “images” folder contained?

    If it’s within your theme folder, then you need to reference the path this way:

    <img src="<?php bloginfo('template_directory');?>/images/frontpage.jpg" alt="" width="808" height="717" border="0" align="middle" usemap="#Map"/>

    p.s. you should never have spaces in image file names, I recommend you change front page.jpg to front-page.jpg or frontpage.jpg

    Thread Starter Skyforger

    (@skyforger)

    Thankyou !

    So in the future i have to define path way with this line before the image path ? <?php bloginfo('template_directory');?>

    So in the future i have to define path way with this line before the image path ? <?php bloginfo(‘template_directory’);?>

    As I said, it depends where your image is located. That bit of PHP echoes out the full path to your theme folder.

    Thread Starter Skyforger

    (@skyforger)

    Why can’t i just use the full path of my img or the url ?

    You can do that too. But if you change themes, for example, your image links will break.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘custom html front page won't show pictures !’ is closed to new replies.