Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Rotate specific header images by category. Vigilance theme. (http://forum.bytesforall.com/showthread.php?t=3548)

vxfnick Sep 21, 2009 10:59 AM

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

Flynn Sep 21, 2009 05:16 PM

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() {

vxfnick Sep 22, 2009 09:24 AM

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:

Originally Posted by Flynn
$files = "";
$imgpath = TEMPLATEPATH . '/images/header/';
$imgdir = get_bloginfo('template_directory') . '/images/header/';
$dh = opendir($imgpath);

Do you have anything else up your sleeve?

thanks
talk soon
Nick

juggledad Sep 22, 2009 10:15 AM

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 09:33 AM.

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