leewillis77 / wp-github-oembed

WordPress Github "oEmbed" plugin
GNU General Public License v2.0
69 stars 19 forks source link

Load css only when post contain github link #8

Closed Mte90 closed 10 years ago

Mte90 commented 10 years ago

Load css only when post contain github link is possible?

leewillis77 commented 10 years ago

There's not currently a straightforward way of doing this I don't think since the embeds aren't processed every time the post is displayed.

If you're concerned about extra HTTP requests, you can either look at a plugin that aggregates CSS files, or add the CSS to your main CSS file and un-enqueue the CSS files using standard WordPress hooks / filters.

Mte90 commented 10 years ago

maybe add the stylesheet in the content and not in the head is a solution.