Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

Specific image rotation on page?


  #1  
Old Jun 27, 2009, 08:16 PM
blueprairie
 
98 posts · Feb 2009
Is it posssible to set up the header image so that is loads from a different directory of header images (still random) but specific to the active page? so images/headerhome would be one set of images and images/headerpageone would be a different set of images?
  #2  
Old Jun 28, 2009, 08:18 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
You could muck with header.php and copy the existing code and add a is_page(..) to identify the page you want the new code on and the directory to grab the images from
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jul 23, 2009 at 04:20 AM.
  #3  
Old Jul 23, 2009, 03:05 AM
zagato
 
4 posts · Jul 2009
This is nearly a month old, but because I wanted to have this solved for a website of myself and juggledad showed the right direction, I thought I'll just post what I did to make that work:

Edit "bfa_rotating_header_images.php" from Atahualpa's "functions" folder.
Look for this code:
PHP Code:
$imgpath TEMPLATEPATH '/images/header/';
$imgdir get_bloginfo('template_directory') . '/images/header/'
Change it to something like this:
PHP Code:
if (is_page('11')) {
      
$imgpath TEMPLATEPATH '/images/header/special/';
          
$imgdir get_bloginfo('template_directory') . '/images/header/special/';
    } else {
      
$imgpath TEMPLATEPATH '/images/header/';
          
$imgdir get_bloginfo('template_directory') . '/images/header/';

This will show all the header images from the subfolder "special" (which I created in the "/images/header/" folder of the theme) on the page with ID 11.
To find out the IDs of pages, I use the WP-Plugin "Reveal IDs for WP Admin", which is handy.

Hope that helps.

P.S.: If there is a better way which will preserve the extra code after updates, I'd be happy to hear.
  #4  
Old Aug 8, 2009, 03:12 PM
Friland
 
17 posts · Aug 2009
Thank you Zagato!
It works.
Now, I only use my website as a 'traditional' website and not a blog.
I would like to have a different headerimage on each page.
I thought I could use your idea but then only have one image in the folder you call 'special'.
Then I would obviously have to create many folders within the 'header' folder.
I tried to copy paste your code and create a new code for each 'special' folder. Something like this:

if (is_page('11')) {
$imgpath = TEMPLATEPATH . '/images/header/special1/';
$imgdir = get_bloginfo('template_directory') . '/images/header/special1/';
if (is_page('12')) {
$imgpath = TEMPLATEPATH . '/images/header/special2/';
$imgdir = get_bloginfo('template_directory') . '/images/header/special2/';
if (is_page('13')) {
$imgpath = TEMPLATEPATH . '/images/header/specia3/';
$imgdir = get_bloginfo('template_directory') . '/images/header/special3/';

} else {
$imgpath = TEMPLATEPATH . '/images/header/';
$imgdir = get_bloginfo('template_directory') . '/images/header/';
}

But it certainly doesn't work! (And I know that I am very new to this stuff!)

Do you have an idea of how I can solve my problem with having different header image for each page and sub-page I create?

Thank you a bunch on beforehand,
Lukas
www.friland.org/wordpress (a page in progress. just mock-up for now)

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image rotation PHP script needs a tweak paulae Sidebars & Widgets 9 Jun 14, 2009 12:41 PM
Desperately looking for help with HIDING header image on one specific page Cristiacus Header configuration & styling 0 Jun 2, 2009 03:50 PM
[SOLVED] Internet explorer v8 post pages not loading, also header rotation image issu bushtool Atahualpa 3 Wordpress theme 11 May 30, 2009 09:32 AM
Page Specific Logos drewpasmith Header configuration & styling 15 May 12, 2009 06:45 AM
How to disable sidebar(s) for specific page/page? gesman Sidebars & Widgets 3 Feb 8, 2009 09:05 PM


All times are GMT -6. The time now is 05:36 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.