Jump to content


Photo
- - - - -

Custom Category Headers

header template

  • Please log in to reply
1 reply to this topic

#1 bcash

bcash

    Newbie

  • Members
  • 1 posts
  • Country: Country Flag

Posted 13 August 2013 - 09:47 PM

I am attempting to get customized header images on 5 different blog categories within the same install. I've seen several workarounds (none of which adequately solve my problem) and am considering some alternatives.

 

For a non-Pagelines site, this code makes sense to show different images on different categories:

 

<code>

<?

if (is_home()){
<img src="welcome.jpg">
}

if(is_category('Travels')){
echo '<img src="travels.jpg">';
}
if(is_category('Musings')){
echo '<img src="musings.jpg">';
}
if(is_category('Lunch')){
echo '<img src="lunch.jpg">';
}
?></code>

 

However, I'm not certain Pagelines gives me that functionality or doesn't have it hidden deep inside something.

 

Some pointers about which section(s)? to start editing? 

 

Do I just need to give up on Pagelines and get a regular theme and customize from there?

 

 



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15084 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 14 August 2013 - 09:28 AM

Hi,

 

You certainly have this functionality. However, you will need to use that code in the form of a hook, see here for more details and examples.

 

Please Login or Register to see this Hidden Content







Also tagged with one or more of these keywords: header, template