• Resolved TeaMike

    (@teamike)


    i created a twenty twelve child theme and a styles-mychild. Now I’d like to add some settings to the styling options of the child theme:

    – opacity setting
    – switch sidebar from right to left

    I understand that i could solve this with a CSS editor or a child theme css but its for a multi-site and those options should be available for all users of the same theme.

    How to do it? Or, if there is a simpler way way to do it, please also tell me.

    http://ww.wp.xz.cn/plugins/styles/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author pdclark

    (@pdclark)

    Hi TeaMike,

    Thanks for your interest in Styles! There are code walkthroughs on how to add custom options to a theme (an they would apply to editing TwentyTwelve for a child theme). Unfortunately, there aren’t any convenience functions in Styles right now for Opacity or Layouts.

    To create those sorts of options, you would need to use the raw WordPress Customizer API. It can get a bit complex, but there are some good resources out there for learning:

    Hope that helps!

    Thread Starter TeaMike

    (@teamike)

    Hello Paul, thanks for the links i’ll work trough them.

    Thread Starter TeaMike

    (@teamike)

    Hi Paul, i succeeded to add a function to switch the sidebar, found the code
    here.

    my problem now (and before applying the above to the childs header and functions files) as i still want to use your styles plugin for the other available functions: when i activate the styles and style-mychild plugins, some of the formatting (padding, width) defined in the child css are no longer working. I’m using WP 3.6.1 and twenty eleven as a parent theme, currently no other plugins are activated.

    Plugin Author pdclark

    (@pdclark)

    Hi TeaMike,

    This would be extremely specific to your child theme. Styles does not change margin or padding in any way, so I’m unsure of what might be causing that. If I were you, I would inspect the element you see an error on with Firebug or the Chrome Inspector, then look at the CSS panel to see where values are being changed.

    For example, see http://www.youtube.com/watch?v=sHbYpl1XFiM

    If you need further assistance with your custom code, others would need your site URL and the specific issue you’re seeing to provide guidance.

    Paul

    Thread Starter TeaMike

    (@teamike)

    Hi Paul
    I’m using Safari’s developer views but i still can’t understand whats happening.

    The site is being worked on so it might be occasionally unreachable or things are switched on or off: http://www.tearoom-hk.com/blog/teatest/

    Screenshots:
    1 – the styles plugin is not active;
    2 – child css
    3 – stylesplugin and stiles-child are activated

    I’ll gladly provide admin access if this can reduce your efforts.

    Plugin Author pdclark

    (@pdclark)

    Hi TeaMike,

    I don’t need admin access to your site, but I do need a more clear description of what your problem is. You said that padding and width were different, but you haven’t said what the difference is in what you’re getting vs. your expectation. Can you provide a screenshot of the two themes, and point out what you consider to be wrong? http://www.tearoom-hk.com/blog/teatest/ looks fairly normal to me.

    Thread Starter TeaMike

    (@teamike)

    Hi Paul

    please see my previous post in which i posted links to screenshots with and without plugin activated, and the child css, which does
    – enlarge the header image to the width of the inner background
    – remove padding of the inner background
    – enlarge the (green) content area and the (green) sidebar area
    – reduce the background area between header image and content

    Plugin Author pdclark

    (@pdclark)

    Wow, I must have been having a rough day. I’m not sure how I didn’t see those.

    Can you provide an admin login after all, so I can check code with and without the plugin on? Please don’t post it here — email it to [email protected]

    Plugin Author pdclark

    (@pdclark)

    Actually, I also thought of might be causing your issue — your custom CSS may be conflicting with a padding change that Styles TwentyTwelve does to get control over background colors in the header, body, and footer area. Try deleting or editing the code in wp-content/plugins/styles-twentytwelve/style.css. That’s this file: https://github.com/stylesplugin/styles-twentytwelve/blob/master/style.css

    Thread Starter TeaMike

    (@teamike)

    I blanked out this css file and that did it! A bit weird because i never activated the styles-twenty-twelve since i am using my own styles-child.

    Thanks for helping me solving this

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Adding functions to styles’ is closed to new replies.