inline_css() needs to be called on other pages/posts
-
I want to show the vacation notice on my home page. For that I’ve done following setup:
- Created a short code that calls
$store_vacation->vacation_notice();
- Created a post that has this short code
- Added Recent Posts block on my home page
This shows the notice text on home page but it doesn’t show the formatting. I tried calling
$store_vacation->inline_css();
from short code but this function internally checks if it’s a cart / checkout / product page and hence it doesn’t output the inline css in my case. For the time being I’ve commented the check insideinline_css()
function.
Can you suggest a better way to handle such requirement?
Can we have some sort of filter that will bypass the checking and allow adding inline css on other pages? - Created a short code that calls
- The topic ‘inline_css() needs to be called on other pages/posts’ is closed to new replies.