Support » Fixing WordPress » Stylesheet selector in functions.php

  • I am developing a theme where I want to give people the option to select from a range of header images and also change the core colour of the header text (primarily) eg h1,h2,h3 etc. I have set up the header image selection no problem, but am struggling with enabling it so people can select different stylesheets to give them a different colour scheme. I want this to all work from within functions.php.

    Any suggestions?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Add a function to the wp_head action hook that will echo out your CSS settings. That way changes will appear instantly in the WP header.

    function add_stuff_to_header() {
    echo $stuff;

    hi ive posted a problem about themes can u help out?
    my theme wont display on other PCs

    Dont’ jump into every thread you see.
    Keep with the thread you started.

    This main wordpress website needs a small CSS upgrade to fix printing. My suggestion is:
    @media print {
    #sidebar { display:none; }
    #bodyContent { position:absolute; left:0; }
    #content { width:100%; }
    #toc { display:none; }
    #footer { display:none; }
    #menu {display:none; }
    .editsection { width:100%; }

    This allows the content (middle) section of the page to takeup the whole page when printed. This can be added to IE as a user-prefered CSS; however, what about “real” browsers. It would be good to have this in the page so we can print Documentation properly.

    I actually want people to be able to select a totally different stylesheet within functions.php. How would I go about this?

    I’ve been looking for ways to do this too. I’ve got a few photos that I’d like to make into headers and then I want different link colours etc depending on the photo but I don’t want to create different themes to change via a theme switcher as then any changes you make to one sidebar have to be made to them all….

    I’d love it if there was a way for users to pick the stylesheet.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Stylesheet selector in functions.php’ is closed to new replies.