• Resolved itsgotime

    (@itsgotime)


    I’m new to using the plugin, have inserted various JS, html and global items but am unsure of how to create a snippet to insert common css, things that I would normally insert within appearance > customize > additional css within WordPress. I have a few css codes to enter, I assume I enter them all in one spot but I can’t locate the area to do this?

    For example:

    /* Remove Google+ */
    .skin_flat .social-likes__widget_plusone {
    display: none;
    }

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @itsgotime,

    The easiest way to load CSS snippets in the current version is to create a HTML snippet and assign that to the Site Wide Header location.

    In the code simply wrap the styles in a <style> tag.

    Using your example you’d have:

    
    <style>
    /* Remove Google+ */
    .skin_flat .social-likes__widget_plusone {
    display: none;
    }
    /* Add more styles here */
    </style>
    
    Thread Starter itsgotime

    (@itsgotime)

    Thanks, so 1.) can I do more than one css inside one or do I have to create multiple HTML snippets? and 2.) would you say this is faster than simply adding the css code to the normal appearance > customize > additional css within WordPress?

    Plugin Author Mircea Sandu

    (@gripgrip)

    Yes, you can add as many rules as you want in 1 snippet or you can also split them up if you wish.

    I think in terms of loading additional CSS both methods will have the same performance but using WPCode will allow you to conditionally load some styles, for example.

    Thread Starter itsgotime

    (@itsgotime)

    One follow-up, for multisites – do all css applied, or other codes, get pushed across all sites or just the site the plugin is activated on?

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

The topic ‘Proper Way to Insert CSS Code with Plugin’ is closed to new replies.