May 26, 201610 yr The wordpress theme I'm currently using only has four color scheme options to choose from. I'm trying to create another one by adding the necessary code into my style.css file. But for some reason it's not showing up as an option when I go to Appearance > theme options. It still only shows the original four options. I can see the code for the other four color schemes. this code is for the blue color scheme. Each color scheme's code looks just like it: /* =Blue ----------------------------------------------- */ .theme-color-blue { background-color: #86afbf; } .theme-color-blue .cat-links a, .theme-color-blue .comments-link a, .theme-color-blue .comments-link span, .theme-color-blue .widget-title, .theme-color-blue .main-navigation, .theme-color-blue .entry-header, .theme-color-blue th, .theme-color-blue .menu-toggle { background-color: rgb(81,140,158); } .theme-color-blue .cat-links a:hover, .theme-color-blue .comments-link a:hover, .theme-color-blue .main-navigation ul ul li, .theme-color-blue .main-navigation ul li.hover, .theme-color-blue .main-navigation ul li:hover { background-color: rgba(81,140,158,.; } They each also have this additional code further down the style.css file: .theme-color-blue.infinite-scroll #infinite-footer .container, .theme-color-blue #infinite-handle span { background-color: rgba(81,140,158,.; border-color: #86afbf; } So I made another color scheme by copying and pasting the codes and replacing "blue" with "uglygreen". Also, everywhere it mentions the background-colors I replaced it with the new colors. So the code I added to create a new color scheme option looks like this: /* =UglyGreen ----------------------------------------------- */ .theme-color-uglygreen { background-color: #86afbf; } .theme-color-uglygreen.cat-links a, .theme-color-uglygreen .comments-link a, .theme-color-uglygreen .comments-link span, .theme-color-uglygreen .widget-title, .theme-color-uglygreen .main-navigation, .theme-color-uglygreen .entry-header, .theme-color-uglygreen th, .theme-color-uglygreen .menu-toggle { background-color: rgb(140,117,54); } .theme-color-uglygreen .cat-links a:hover, .theme-color-uglygreen .comments-link a:hover, .theme-color-uglygreen .main-navigation ul ul li, .theme-color-uglygreen .main-navigation ul li.hover, .theme-color-uglygreen .main-navigation ul li:hover { background-color: rgba(140,117,54,.; } and this: .theme-color-uglygreen.infinite-scroll #infinite-footer .container, .theme-color-uglygreen #infinite-handle span { background-color: rgba(140,117,54,.; border-color: #86afbf; Any idea why it's not listing my new color scheme as an option in "theme options"?
May 26, 201610 yr It's because wordpress doesn't know about the new colour scheme. There will be a set of functions in the theme files that manages and displays the colour schemes. It could be in functions.php or the admin files or maybe header.php. It's impossible to know without knowing which theme your are using.
May 26, 201610 yr Author It does mention the color scheme options in functions.php, so I added the code for my new color scheme there as well: $options = babylog_get_theme_options(); $colorscheme = $options['color_scheme']; if ( isset( $colorscheme ) && ! empty( $colorscheme ) ) { if ( 'green' == $colorscheme ) $backgroundcolor = 'c2e2bf'; else if ( 'blue' == $colorscheme ) $backgroundcolor = '86afbf'; else if ( 'pink' == $colorscheme ) $backgroundcolor = 'e29393'; else if ( 'purple' == $colorscheme ) $backgroundcolor = 'bfa1c6'; else if ( 'uglygreen' == $colorscheme ) $backgroundcolor = '63a89b'; } But, it still isn't giving me the option to choose the new color scheme. I used my browser search tool to search all the other theme files for "color" and I don't see anything else that seem relevant. What do you mean by "admin files"?
May 27, 201610 yr Functions.php manages the output. There will be another file somewhere that manages the theme options. It could be the customiser, a settings file or something else. Each theme does it differently. What's the theme?
May 28, 201610 yr Author Ok, I got it. It was in theme options, which I didn't have access to from the Wordpress Editor.
Create an account or sign in to comment