Title: [Plugin: WordPress Popular Posts] Request use of wp_enqueue
Last modified: August 20, 2016

---

# [Plugin: WordPress Popular Posts] Request use of wp_enqueue

 *  [alturnwall](https://wordpress.org/support/users/alturnwall/)
 * (@alturnwall)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/)
 * Couldn’t find other contact info, so listing here.
 * Would it be possible to see use of [wp_enqueue_script()](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
   and [wp_enqueue_style()](http://codex.wordpress.org/Function_Reference/wp_enqueue_style)
   in a future release of this?
 * I’d be willing to help out with some code updates if you’re looking for any collaborators.
 * Thanks!
 * [http://wordpress.org/extend/plugins/wordpress-popular-posts/](http://wordpress.org/extend/plugins/wordpress-popular-posts/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/#post-2696671)
 * Hi alturnwall,
 * The _wp\_enqueue\_style_ function has been implemented already on the development
   version (not released yet as I’m still reworking some stuff and adding new features).
 * About _wp\_enqueue\_script_, where should it be applied to?
 *  Thread Starter [alturnwall](https://wordpress.org/support/users/alturnwall/)
 * (@alturnwall)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/#post-2696681)
 * Hector, thanks for getting back to both of my posts, and thanks for the great
   plugin!
 * Looking forward to the dev version, and idea when we might be able to grab that
   code? Or can I get it now from the subversion repo?
 * You’re right, wp_enqueue_script should not be used—I was digging through a few
   plugins all at once and incorrectly copied and pasted that comment here also.
 * Thanks again.
 *  [Texiwill](https://wordpress.org/support/users/texiwill/)
 * (@texiwill)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/#post-2696701)
 * Hello,
 * I just implemented this as well…. I did the following:
 * after line 123 I added:
 *     ```
       // Enqueue Style Sheet
                               if (function_exists('wp_enqueue_style')) {
                                       wp_register_style( 'wpp-css', plugins_url('style/wpp.css', __FILE__) , array(), $version);
                                       wp_enqueue_style( 'wpp-css' );
                               }
       ```
   
 * And then in wpp_print_stylesheet I modified it to be the following, in this way
   the older functionality is available if necessary.
 *     ```
       // still needed if no enqueue
                               if (!function_exists('wp_enqueue_style')) {
                                       $css_path = (@file_exists(TEMPLATEPATH.'/wpp.css')) ? get_stylesheet_directory_uri().'/wpp.css' : plugin_dir_url( __FILE__ ).'style/wpp.css';
                                       echo "\n"."<!-- WordPress Popular Posts v".$this->version." -->"."\n".'<link rel="stylesheet" href="'. $css_path .'" type="text/css" media="screen" />'."\n"."<!-- End WordPress Popular Posts v".$this->version." -->"."\n";
                               }
       ```
   
 * — Edward
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/#post-2696710)
 * Hi guys,
 * [@alturnwall](https://wordpress.org/support/users/alturnwall/) the dev version
   isn’t public yet as it still needs a _lot_ of work.
 * [@texiwill](https://wordpress.org/support/users/texiwill/) thanks for sharing
   your code!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WordPress Popular Posts] Request use of wp_enqueue’ is closed
to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-wordpress-popular-posts-plugin-wordpress-popular-posts-request-to-use-wp_enqueue/#post-2696710)
 * Status: not resolved