• Resolved dimitris33

    (@dimitris33)


    Hi, i am using your plugin to customize my home page for a custom theme and so far it works great.I cannot make it work though for pages like single-page.php , i tried the body classes css to specify the rule but i think it does not respect it.

    could you help?

    example

    .single .post { background:etc..}

    https://www.ads-software.com/plugins/styles/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Paul Clark

    (@pdclark)

    I’m a bit clear on how you’re trying to make that edit. Are you attempting to add new options by editing customize.json in your own plugin or theme?

    If so, your approach of using the .single body class to target elements on the single page is correct. If you don’t see a change take effect, verify that the CSS selector is correct, and verify that other CSS rules are not conflicting with or overriding your custom one. For example, the computed side panel in Firebug will tell you all styles assigned to an element, and whether some selectors are overriding others.

    CSS selectors aren’t only applied in the order they’re declared — they also apply in order of selector specificity. IDs carry much more weight than classes, which carry more weight than tags. For example, see https://css-tricks.com/specifics-on-css-specificity/ .

    If all else fails, custom selectors can also have !important applied by setting "important": true in the JSON.

    Thread Starter dimitris33

    (@dimitris33)

    i ll try it again, i tried many combination and i have a ‘basic’ knowledge of css , in my tests any body class i tried was not working, but since you know better i will try again.

    Thanks for the reply.

    ps.amazing plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Style single post/page in theme’ is closed to new replies.