Support » Plugin: Autoptimize » above the fold css cut meta description and meta keywords

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frank Goossens

    (@futtta)

    haven’t seen that happen yet kubabuba …

    some questions:
    * are the keywords/ description truncated in the HTML, or is this reported by e.g. google webmaster tools or some other external tool?
    * what theme are you using?
    * what SEO plugin do you have doing your description/ keywords?
    * could you share the URL of your site so I can have a look at what is happening?

    frank

    Thread Starter kubabuba

    (@kubabuba)

    Hello Frank

    * missing keywords/ description are reported by seopitimer.com
    * salient theme
    * Yoast SEO
    * sent you in private message

    thx

    Plugin Author Frank Goossens

    (@futtta)

    no private messages here, but you can mail me at futtta-at-gmail-dot-com 🙂

    frank

    Plugin Author Frank Goossens

    (@futtta)

    thanks for the mail kubabuba. I had a look at the site and can confirm the meta-tags are still in the HTML, so the problem probably is they’re not “high enough” in the HTML to be found by seoptimizer.com. this is similar to the problem described in this recent thread actually and the solution would be similar too, obviously; tell AO to insert the CSS elsewhere.

    try this code (use code snippets or add to a child theme’s functions.php if you know what you’re doing);

    add_filter('autoptimize_filter_css_replacetag','kubabuba_ao_override_css_replacetag',10,1);
    function kubabuba_ao_override_css_replacetag($replacetag) {
    	return array("<script","before");
    	}

    this will inject AO’s CSS before the first <script block (which is injected by Yoast’s SEO, the ld+json stuff).

    let me know if this fixes the problem for you!

    have fun,
    frank

    Thread Starter kubabuba

    (@kubabuba)

    Hi Frank
    I’ve done what you’ve wrote and after cleraring cache seoptimer.com start to see meta description. Thank you Frank for your plugin, time and comitment. My site with your plugin scored 96, 90, 96 in Page Speed Insight. Five stars for you.
    thx

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘above the fold css cut meta description and meta keywords’ is closed to new replies.