wordpress

Create WordPress widget template from scratch

I’ve save down the most basic widget code for WordPress, you can copy this to your plugin and modify it to start your first widget. You can save time on this tutorial to help you create wordpress widget from scratch. [code lang=”php”] <?php class example_widget extends WP_Widget { function __construct() { parent::__construct(false, $name = ‘Example …

Create WordPress widget template from scratch Read More »

lazy-result.js ReferenceError: Promise is not defined

[code lang=”javascript”] node_modules/postcss/lib/lazy-result.js:157 this.processing = new Promise(function (resolve, reject) { ^ ReferenceError: Promise is not defined [/code] When I install the FoundationPress, after I run gulp build I saw this message, this is because the node version problem. the have mention in this post https://github.com/postcss/postcss-nested/issues/30 Solution [code lang=”shell”] vim node_modules/postcss/lib/lazy-result.js [/code] Put this to the …

lazy-result.js ReferenceError: Promise is not defined Read More »

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]

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 …

Remove ver version number for JS and CSS in WordPress Read More »

PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in

PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in You may see this error in WordPress while disabled some plugin, because they plugin is need to use the WP_List_Table class from the WordPress. Solving the problem Add this to any of your activated plugin the it will load the class if it is not …

PHP message: PHP Fatal error: Class ‘WP_List_Table’ not found in Read More »