• I want to show the vacation notice on my home page. For that I’ve done following setup:

    1. Created a short code that calls $store_vacation->vacation_notice();
    2. Created a post that has this short code
    3. 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 inside inline_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?

  • The topic ‘inline_css() needs to be called on other pages/posts’ is closed to new replies.