Support » Plugin: Add Admin CSS » change colour for private note

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    Hi @louisapple: Could there be a conflict with another plugin that’s running on your production site but not your staging site, or a typo/difference between the two CSS statements you’ve written?

    In general, if you know how to, I’d first view the page source and serach for some unique aspect of the CSS you added (such as “f98b8b”) to verify that the CSS was actually output by the plugin into your admin page. If so, then I’d use your browser’s inspector tool on the element (the note content) that you were trying to change to see if there is a CSS rule that may be more specific (and therefore takes precedence) over the rule you provided.

    I did just release v2.0.1 of the plugin which fixes a bug some users were experiencing, but that was mostly related to the plugin page not appearing. But I’d recommend using the latest just to be absolutely sure things weren’t also affecting you.

    Cheers!

    Thread Starter louisapple

    (@louisapple)

    can i paste the view source page here?

    </style>
                <style>.tnp-side-menu { color: #E67E22!important; }</style>
                <style> 
                    th#wholesale_price { 
                        width: 10% !important;
                    }
    
                    table.wp-list-table .column-product_cat, table.wp-list-table .column-product_tag { 
                        width:5%;
                    } 
                </style>
    
                
    				<meta name='apple-itunes-app' content='app-id=1389130815'>
    			
    			<style>
    			ul.order_notes li .note_content {
        background: #f98b8b;
    }
    			</style>
    				<link id="wp-admin-canonical" rel="canonical" href="https://www.xxxx.com.au/xxxxxxx/post.php?post=117259&action=edit" />
    	<script>
    		if ( window.history.replaceState ) {
    			window.history.replaceState( null, null, document.getElementById( 'wp-admin-canonical' ).href + window.location.hash );
    		}
    	</script>
    	<script type="text/javascript">var _wpColorScheme = {"icons":{"base":"#a7aaad","focus":"#72aee6","current":"#fff"}};</script>
    Plugin Author Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    The style you configured via the Add Admin CSS plugin does appear in the source snippet you provided, so that’s confirms the plugin is working and is basically the primary thing the plugin is meant to do.

    I don’t know enough about what else is going on in the page, but it will likely be one of the following issues:

    1. The CSS selector you provided is incorrect and doesn’t match the element you intended.
    2. There is another CSS rule with greater specificity for the element you are targeting, so that rule is overriding yours.

    I’d suggest again to use your browser’s inspector tool on the element (the note content) that you were trying to change to see if either of these are the case. You should be able to see your custom styling applied and if it’s getting overridden.

    Thread Starter louisapple

    (@louisapple)

    it works now and i did not do anything, just active and reactive the plugin

    Thread Starter louisapple

    (@louisapple)

    and i realised that it is not only work for preivate note only, if the order note was created from user even put order from on hold to proecessing, it will be highlighted as well

    Thread Starter louisapple

    (@louisapple)

    is that any way to just hightlight private note?

    Plugin Author Scott Reilly

    (@coffee2code)

    WordPress & Plugin Developer

    It sounds like you’re getting into the realm of using CSS itself and not necessarily the functionality of the plugin.

    What you want may be possible. It really depends on the HTML markup used for these private notes. I don’t know what you have generating these notes or what the markup looks like, including any potential HTML classes being used, so it’s difficult to provide any assistance.

    Based on the CSS you were trying, it seems reasonable that it affects all notes since there isn’t anything that indicates the CSS should only apply to private notes and not other types of notes.

    Again, the markup used for the notes will dictate if private notes can be specifically targeted and how.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.