[resolved] Image not displaying in index.php (5 posts)

  1. richardpd
    Posted 5 years ago #

    I am trying to develop my own basic WP themes and learn WP theme coding and would appreciate some help with a theme I am doing now.

    Specifically this is with my new Chess blog theme (using html 5 & CSS3-though this is all new to me!)at
    ChessatmybloG(my online WP theme test site).

    My first problem is Chessheader image in nav /section id="intro" is not displaying. I expect it has something to do with the path/address to the image but I am not sure how to code this! Presently it is simply:
    <img src="chessheader.jpg" alt="Chessheader" > & this is enough to display fine in the html version but not in the WP theme!

    Also I am looking for the WP php code to allow new pages to become nav bar menu links.
    Meanwhile I will keep looking through the codex

    I am most grateful for help with this and look forward to replies,
    many thanks

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Don't use relative urls in your markup. Use full (absolute) urls only).

    As for Page lists, see:

  3. keesiemeijer
    Posted 5 years ago #

    make a folder "images" inside your theme and put the chessheader.jpg in there
    now try:
    <img src="<?php bloginfo('template_directory'); ?>/images/chessheader.jpg" alt="Chessheader" />

  4. richardpd
    Posted 5 years ago #

    Thanks esmi & keesiemeijer

    I now have the image issue fixed and will look at page lists now.
    (I did wonder about having an images folder & it seems it was needed!).

    Best wishes

  5. keesiemeijer
    Posted 5 years ago #

    Glad you got it working! Now, please use the dropdown at top right to mark this topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic