Rotate specific header images by category. Vigilance theme.
Hi
I would appreciate advice with this issue. I have never seen so many setting pages in my life in any theme that I have ever worked with. I am not an expert nor do I claim to be. I can however, work within style sheets and do basic edits in .php but I am afraid this theme is a little over my skill set! So inlays the issue. Is there a plug-in that will help with my specifications? OR Is there a coding resolution that I can use for rotating header images via category? After taking a look at the engine that runs this theme I am sure that I will have to edit the engine pages. Thanks in advance for your responses. Nick |
You could try to edit functions/bfa_rotating_header_images.php
$files = ""; $imgpath = TEMPLATEPATH . '/images/header/'; $imgdir = get_bloginfo('template_directory') . '/images/header/'; $dh = opendir($imgpath); to: $files = ""; if ( is_category('Category name')) { $imgpath = TEMPLATEPATH . '/images/header/cat1/'; $imgdir = get_bloginfo('template_directory') . '/images/header/cat1/'; } elseif ( is_category('Category name 2')) { $imgpath = TEMPLATEPATH . '/images/header/cat2/'; $imgdir = get_bloginfo('template_directory') . '/images/header/cat2/'; } elseif ( is_category('Category name 3')) { $imgpath = TEMPLATEPATH . '/images/header/cat3/'; $imgdir = get_bloginfo('template_directory') . '/images/header/cat3/'; } else { $imgpath = TEMPLATEPATH . '/images/header/'; $imgdir = get_bloginfo('template_directory') . '/images/header/'; } $dh = opendir($imgpath); If it doesn't work add global $wp_query; right after function bfa_rotating_header_images() { |
Thanks for the reply.
There doesn't seem to be a "functions/bfa_rotating_header_images.php" file I took different variations of this code below and went into every .php file in the site and was unable to find anything that resembled this. Quote:
thanks talk soon Nick |
the rotating headers is part of the Atahualpa theme
there is some code in a post I wrote (see Atahualpa->Headers forum) I think it is a sticky. You could try using it as a basis for changing the header code |
All times are GMT -6. The time now is 06:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.