You can add this to your function to enable your short code in widget without pain. [php] add_filter( ‘widget_text’, ‘shortcode_unautop’); add_filter( ‘widget_text’, ‘do_shortcode’); [/php]
Category Archives: Wordpress
How to Setup Temporary WordPress Staging Site
I’m going to Setup Temporary WordPress Staging Site using same MySQL database. It is very useful for you to develop themes or plugin without affect to your current running sites, and you need to use real data to test it out. Prepare your contents Copy all your current contents from [code lang=”bash”] /var/www/juzhax.com [/code] to Continue reading “How to Setup Temporary WordPress Staging Site”
How to remove ver from js and css in WordPress ?
Remove the ver=date behind the JS and CSS in wordpress. [php] // Load in any own plugin function juz_remove_wp_ver_css_js( $src ) { if ( strpos( $src, ‘ver=’ ) ) $src = remove_query_arg( ‘ver’, $src ); return $src; } add_filter( ‘style_loader_src’, ‘juz_remove_wp_ver_css_js’, 9999 ); add_filter( ‘script_loader_src’, ‘juz_remove_wp_ver_css_js’, 9999 ); [/php]
Query WordPress Jetpack Stats using API and return as CSV
http://stats.wordpress.com/csv.php?api_key=123456789abc&blog_id=56174071&end=2013-12-31&day=500&limit=-1 Error: api_key is a required parameter. Required parameters: api_key, blog_id or blog_uri. Optional parameters: table, post_id, end, days, limit, summarize. Parameters: api_key String A secret unique to your WordPress.com user account. blog_id Integer The number that identifies your blog. Find it in other stats URLs. blog_uri String The full URL to the root directory Continue reading “Query WordPress Jetpack Stats using API and return as CSV”
Delete WordPress old Revisions using SQL Query
DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = ‘revision’
Remove ver version number for JS and CSS in WordPress
The varnish load so much of different version in my wordpress, so I would like to remove all the ver from the source. 53.76 RxURL /wp-content/themes/responsivepro/core/js/responsive-modernizr.js?ver=2.6.1 51.22 RxURL /wp-content/themes/responsivepro/core/js/responsive-scripts.js?ver=1.2.4 16.12 RxURL /wp-includes/js/jquery/jquery.js?ver=1.10.2 15.70 RxURL /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1 15.59 RxURL /wp-content/themes/responsivepro/core/css/style.css?ver=1.9.3.4 15.59 RxURL /wp-content/themes/responsivepro/pro/lib/css/style.css?ver=1.0 15.58 RxURL /wp-content/plugins/RadControl/js/adclk.js?ver=2013-06-21 15.56 RxURL /wp-content/themes/responsivepro/style.css?ver=1.9.3.4 15.56 RxURL /wp-content/plugins/jetpack/modules/widgets/wid Solution to solve Add this Continue reading “Remove ver version number for JS and CSS in WordPress”
