Support » Fixing WordPress » Any PHP guy’s here? A little debugging help needed please.

  • 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • no one have any idea?

    Thanks

    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

    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any PHP guy’s here? A little debugging help needed please.’ is closed to new replies.