Unable to load css in wordpress 3.6 -


we developing wordpress plugin. working fine in older version of wordpress css not being loaded in wordpress 3.6

for loading css using code :

global $wp_query;        $posts = $wp_query->posts;     $pattern = get_shortcode_regex();      foreach ($posts $post)     {         if ( preg_match_all( '/'. $pattern .'/s', $post->post_content, $matches ) && array_key_exists( 2, $matches ) && in_array( 'myshorcode', $matches[2] ) )         {             wp_enqueue_style('ap-bootstrap-css',plugins_url('menu-pages/bootstrap-assets/css/bootstrap-appointpress.css', __file__));             wp_enqueue_script('ap-jquery.min.js',plugins_url('menu-pages/bootstrap-assets/js/jquery.min.js', __file__));             wp_register_style('ap-bootstrapoverlay-css',plugins_url('overlay.css', __file__));             wp_enqueue_style('ap-bootstrapoverlay-css');         }         } 

how can resolve problem ?

edit

i getting problem if use shortcode in sidebar or footer

do not loop through posts load css , js, yet alone posts. code crash sites.

with out seeing rest of code, looks enqueing wrong also.

in wp-config.php turn on wp_debug

define('wp_debug', true); 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -