My tweaks to make this work for me incase anyone else has the same problems.
-
Hi there, love the plugin. I had to make a few modifications to get it to work right. The notice didn’t display two lines worth of text because the height of the div was set to 50px so it could never grow taller. This effects both desktop and mobile, only the mobile is more likely to force two or more lines of text.
First, I added the custom css: .swn_banner{ min-height:50px; height:auto;} This allows the notice to stretch higher to fit 2 lines or more.
Second, the close button image did not display when going more than one page deep in my site. It needs the background url to have the whole site address. example:
.closeButton{background:url(‘https://example.com/wp-content/plugins/sitewide-notice-wp/images/close-button.png’) no-repeat center center;} Actually, if someone smarter than me could code the wordpress magic that would replace the https://example.com/ it would be even better.These modifications make the plugin work great on my desktop and mobile.
Finally, I had the plugin enable/disable button stretching all the way down the page in the admin panel like someone else mentioned before. So I added the following code to the end of the bootstrap-switch.min.css file:
.bootstrap-switch{height:30px !important;}
.bootstrap-switch-container{height: 30px !important;}
I believe this was already mentioned, but 30px works better for me than the 50px someone mentioned.
And I increased the input box size of the text message and custom css to 125 by editing the sitewide-settings-page.php on around line 105 size=”50″ to size=”125″ and around line 135 cols=”50″ to cols=”125″. This gave me more room to type the message and custom css.Now for the actual support question. Any way to use cookies to remember if the user closes the notice, so it doesn’t keep popping back up each time a new page is visited or current page is refreshed? Would be even better if I could specify time to show again, for instance, have a admin setting in days or hours. So if I say 1 day, then after one day, the user cookie would allow the popup again, but then when closed, stay closed for 1 day again repeating this cycle as long as I have that current site wide message active.
The topic ‘My tweaks to make this work for me incase anyone else has the same problems.’ is closed to new replies.