Forums

Theme Toolkit conditionals (3 posts)

  1. Alex Cragg
    Member
    Posted 5 years ago #

    Just adding the theme toolkit to a new theme im creating, and a question has arisen.

    Can i define one output, depending on another? In practical terms, i mean if someone chooses the blue or purple footer, can i automatically change the font color to white.

    the function ive made is this:

    function mytheme_footer_color() {
              global $mytheme;
              if ( $mytheme->option['footercolor'] ) {
                  print '#footer {background: ';
                  print $mytheme->option['footercolor'] ;
                  print " ;}\n";
              }
    }

    So i want to say if $mytheme->option['footercolor'] = #244D83 or #A20675, then print color:#FFFFFF;, else print color:#595959;

    but i dont know where in the existing function to put this, or how to write it correctly.

    Thanks for any help.

  2. Chris_K
    Member
    Posted 5 years ago #

    Out of curiosity, what's "theme toolkit"?

  3. Alex Cragg
    Member
    Posted 5 years ago #

    sorry, thought people would know about it.
    http://planetozh.com/blog/my-projects/wordpress-theme-toolkit-admin-menu/
    it basically lets you add an admin page for your theme when someone activates it for the blog.

    any ideas how i can achieve what i wanted?

    thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.