How to apply different header image on each and every post in wordpress?

4 replies
  • WEB DESIGN
  • |
hello everyone!!

I am trying to show different header images on different post. Is there any condition check for post? I tried for checking page condition but there is nothing for checking post condition.

Anybody please help me.

Thank you in advance.
#apply #header #image #post #wordpress
  • Profile picture of the author WebMomentum
    I had that problem on a project a while back.

    My quick solution was a bit of php to generate a random number between 1 and 10 (I made 10 different header images) with filenames like filename_5.jpg. It was pretty basic - once I generated the random number I just inserted the dynamic variable into the image name filename_<random number variable>.jpg
    Signature

    {{ DiscussionBoard.errors[4675940].message }}
  • Profile picture of the author Istvan Horvath
    Originally Posted by diva123 View Post


    I am trying to show different header images on different post. Is there any condition check for post? I tried for checking page condition but there is nothing for checking post condition.
    The new default theme (2011) can do it.

    Just make sure you select an image (at the right sidebar's bottom) as "featured image".

    When seeing that post in single post view - the 'featured image' shows up as the header image.
    Signature

    {{ DiscussionBoard.errors[4677376].message }}
  • Profile picture of the author diva123
    Thanks for the ans
    {{ DiscussionBoard.errors[4742028].message }}
    • Profile picture of the author SternRichard
      I think the settings have been changed, just go to setting option and unchek the Apply to all option. You will set different images.
      {{ DiscussionBoard.errors[4743029].message }}

Trending Topics