WordPress.org

Ready to get started?Download WordPress

Forums

Any PHP guy's here? A little debugging help needed please. (4 posts)

  1. elyonline
    Member
    Posted 8 years ago #

    Hi all,

    Skippy has been helping me with a little code but I seem to get a white screen when I implement the code and no source is viewable either..

    Is there anyone who can spot an error in the code?

    Here is the code: http://www.pastebin.co.uk/607

    Essentially what this should do is show an image (that has the same name as the slug of the post) if no associated image is found it goes to the random rotate images script for 'single' and 'home' pages, in 'home' it will ignore any posts that are under category '26'.

    Anyone any ideas?

    Thanks
    Karl

  2. elyonline
    Member
    Posted 8 years ago #

    no one have any idea?

    Thanks

  3. davidchait
    Member
    Posted 8 years ago #

    does hardcoding the css for the last two cases work? I've never tried using a php script in a CSS image url...

    does the script work in ANY cases? or does it always show white?

    have you tried cranking up your error reporting? i.e., something like:

    error_reporting(E_ERROR | E_WARNING | E_PARSE);
    ini_set("display_errors","1");

    -d

  4. elyonline
    Member
    Posted 8 years ago #

    Hi David,

    'does the script work in ANY cases?'

    Yes it works just fine for 'single.php', see here: http://www.elyonline.co.uk/archives/2006/04/10/world-cup-stories/ but it's my homepage that it fails on when a post that is hidden (events category) from the homepage publishes. See here: http://www.elyonline.co.uk

    What I am trying and failing to do is just show the relevant header image for the most recent post that is on the homepage.

    Just to fill you in: If there is no image associated with a post then a rotate.php goes in play and show random images of Ely.

    Thanks
    Karl

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.