Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Formatting
Source Link
Dave Romsey
  • 17.9k
  • 11
  • 55
  • 70

WordPress (i.e. TinyMCE) automatically strips the tag<style> tag from articles in newer version. This means, you can only rely on inline CSS which makes the code ugly for more complex styling options and is also limited.

In my case, I want to include a hover:hover functionality, but hover:hover does not work with inline CSS. Using the tag<style> tag in the body does not work either, though.

I've tried this fix/hack, but it doesn't work with newer versions of WordPress.

Any suggestions how to change this?

(An alternative would be to get WPWordPress to accept the inclusion of external CSS files for individual articles.)

WordPress (i.e. TinyMCE) automatically strips the tag from articles in newer version. This means, you can only rely on inline CSS which makes the code ugly for more complex styling options and is also limited.

In my case, I want to include a hover functionality, but hover does not work with inline CSS. Using the tag in the body does not work either, though.

I've tried this fix/hack, but it doesn't work with newer versions of WordPress.

Any suggestions how to change this?

(An alternative would be to get WP to accept inclusion of external CSS files for individual articles.)

WordPress (i.e. TinyMCE) automatically strips the <style> tag from articles in newer version. This means, you can only rely on inline CSS which makes the code ugly for more complex styling options and is also limited.

In my case, I want to include :hover functionality, but :hover does not work with inline CSS. Using the <style> tag in the body does not work either though.

I've tried this fix/hack, but it doesn't work with newer versions of WordPress.

Any suggestions how to change this?

(An alternative would be to get WordPress to accept the inclusion of external CSS files for individual articles.)

Source Link
R.G.
  • 135
  • 1
  • 5

How to get WordPress to accept the <style> tag in articles (or other alternatives)

WordPress (i.e. TinyMCE) automatically strips the tag from articles in newer version. This means, you can only rely on inline CSS which makes the code ugly for more complex styling options and is also limited.

In my case, I want to include a hover functionality, but hover does not work with inline CSS. Using the tag in the body does not work either, though.

I've tried this fix/hack, but it doesn't work with newer versions of WordPress.

Any suggestions how to change this?

(An alternative would be to get WP to accept inclusion of external CSS files for individual articles.)