• Hi,

    Because I need to display SEO and title tags on top of <head> tag.
    So How do I move the inline style id=”litespeed-ucss” before the closing </head> tag.
    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    unfortunately it can’t , it’s hard-coded position

    usually it looks for <meta charset= as anchor to add code , maybe you can try move this on your theme file to manipulate the position.

    Best regards,

    Thread Starter minhduc.dev

    (@ducpl)

    Is there any filter I can use easier bro.
    For example this

    add_filter('o_optm_ucss_inline','uncss_inline_replacetag',10,1);
    function uncss_inline_replacetag($replacetag) {
    	return array('</head>','before');
    }
    Plugin Support Hai Zheng⚡

    (@hailite)

    add_filter(‘litespeed_optm_html_head’, function($con) {return “your content”.$con;});

    Thread Starter minhduc.dev

    (@ducpl)

    Thank you, Did you mean this.

    add_filter('litespeed_optm_html_head', function($con) {return "<meta property='og:type' content='product' />".$con;});

    But is it possible to move <style id=”litespeed-ucss”>… </style> before the </head> tag bro. Because my SEO header plugin needs to be rendered before litespeed-ucss.

    Example: <style id=”litespeed-ucss”>… </style></head>

    Plugin Support Hai Zheng⚡

    (@hailite)

    Use add_filter('litespeed_optm_html_after_head','__return_true'); w/ v4.4.2-a4+.

    Thread Starter minhduc.dev

    (@ducpl)

    add_filter('litespeed_optm_html_after_head','__return_true');

    You mean will be updated in the new version?

    Thank you @hailite.

    Plugin Support Hai Zheng⚡

    (@hailite)

    Its already on dev branch. You can try Beta Test.

    Thread Starter minhduc.dev

    (@ducpl)

    Nice , have nice day

    Thread Starter minhduc.dev

    (@ducpl)

    @hailite

    Oh what a great day, after waking up I tested your beta.
    Surprised when using this new filter the style has moved down. Very good looking good when the seo tags are on top.
    Thanks!

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

The topic ‘How move style inline litespeed-ucss’ is closed to new replies.