If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2020
    Member #

    Question Image display problem in header.php

    Hi all,
    So, I'm creating a wordpress site from scratch.
    I've created a header.php file which contains an image, links and search bar.
    I have a few pages: front-page.php, page-about.php and contact.php.
    Each of these pages calls the header.php.
    The header displays in every page BUT the image only displays on the front-page.php.
    I find this odd because each page calls the same header.php file but only the front page displays the image.

    Anyone have an idea why the image doesn't display on all pages?



  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    760 times
    Do you mean you are creating your own mini version of Wordpress that sort of works in the same way as Wordpress, or do you mean you are trying to create an actual Wordpress site?

    When you say about.php also ‘calls’ the header.php script, what do you mean by ‘call’? Post a PHP script example of about.php

    And post your header.php also

  4. #3
    Junior Member
    Join Date
    Jan 2021
    Member #
    If you have hard coded the image into the header.php then you need to make sure the path is correct for all other pages if they reside in a directory. View source and click on the image to see if it loads or throws out a 404 error.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Tags for this Thread

All times are GMT -6. The time now is 06:11 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: