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 »

Conditional div background by Page Parent


 
Prev Previous Post   Next Post Next
  #1  
Old May 3, 2010, 10:09 PM
jaxon
 
27 posts · Jan 2010
Conditional div background by Page Parent

Hi there folks,

I'm using the Simple Section Navigation widget to display Parent Page (section) specific menus. ie. When viewing a top level page that has children or one of the children - the page menu widget only displays links to that parent and the children/siblings. This works great.

What I now need to do, is change the style of other page elements based on the same logic. ie. When viewing a particular parent page or any of its child pages -> the side menu only shows this parent and sub-pages (currently working) AND a widget's background color changes... (or any given DIV has its style changed)

My only real attempt at this so far was to add this "test code" into style.php
Of course "is_page(77) won't give the parent/child relationship I'm looking for. It was more of an attempt at a "proof of concept". Unfortunately it proofed to be a poor concept

Code:
/* CUSTOM WIDGET COLORS */

<?php if is_page(77) { ?>

$title = 'div.text-3 {background: #008400;}';
echo $title;

<?php } ?>

So, any ideas would be greatly appreciated. even from novices like myself

Juggledad, if you're able to help I can offer more meager incremental payments

Thanks,
Jaxon
 

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Subpages are all highlighted when parent page is selected on page menu bar danielphenry Page & Category Menu Bars 9 Feb 27, 2010 01:34 AM
Conditional PHP issue MyJourneytoMillions Center area post/pages 6 Feb 10, 2010 03:11 PM
[SOLVED] Background image of child items not the same as parent noahinBR Header configuration & styling 2 Feb 4, 2010 12:43 PM
Want to make background image visible through logo div keblake Header configuration & styling 4 Mar 11, 2009 08:32 PM


All times are GMT -6. The time now is 06:56 PM.


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