Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8761517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:18:18+00:00 2026-06-13T15:18:18+00:00

My plugin adds dynamic CSS to the frontpage: function form_css() { header( ‘Content-Type: text/css’

  • 0

My plugin adds dynamic CSS to the frontpage:

function form_css() {
    header( 'Content-Type: text/css' );
    header( 'Expires: Thu, 31 Dec 2050 23:59:59 GMT' );
    header( 'Pragma: cache' );

    if ( false === ( $css = get_transient( 'mymail_form_css' ) ) ) {
        // generate CSS here
        set_transient( 'mymail_form_css', $css );
    }

    echo $css;
    die();
}

add two action hooks:

add_action('wp_ajax_my_css', 'form_css');
add_action('wp_ajax_nopriv_my_css', 'form_css');

and enqueue the style:

wp_register_style('my-css', admin_url('admin-ajax.php?action=my_css'));
wp_enqueue_style('my-css');

This works perfectly on all browsers (including IE7+8) except on IE9.

I’ve searched for this issue and found about the X-Content-Type-Options: nosniff header but adding header( 'X-Content-Type-Options: nosniff' )doesn’t solve the problem.

Any help is kindly appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T15:18:19+00:00Added an answer on June 13, 2026 at 3:18 pm

    I don’t know if this helps somebody. At least for me it does:

    WordPress wraps p tags around my shortcodes and since I’m using block elements in my form (and shortcode) I’ve and block element inside a block element – which isn’t allowed.

    Removing the surrounded p’s solves the problem.

    Edit: Use the Shortcode empty paragraph fix to remove the p’s

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Twitter Bootstrap Plugin from Worpit for Wordpress, and it adds http://www.drtimkinsella.com/wp-content/themes/wordpress-bootstrap-v2.1/css/bootstrap.min.css
I've created a Grails plugin which adds a custom test type class (extending GrailsTestTypeSupport
The jQuery Treeview Plugin adds Collapse All, Expand All and Toggle All links to
Current tinyMCE version (3.5.2). Hi, I am working on a custom plugin which adds
Really, really trying to find a plugin that gives adds functionality to the image-resize
I'm working with a WordPress plugin. It adds a flash player to the output
I'd like to try the plugin for Vim linked below. It adds syntax highlighting
Edit: I figured this out. jQuery Cycle plugin adds a z-index to every item
I have a plugin I have been working on that adds publishing to ActiveRecord
I've been making a jQuery plugin for password boxes. It adds a generate password

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.