Viewing Snippet "Wordpress wp config error debug display errors + jQuery and post id post_id selectors cheatsheet"id: 41#safest/cleanest define('WP_DEBUG', true); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); define( 'WP_DEBUG_LOG', true ); define( 'WP_AUTO_UPDATE_CORE', false ); # Basics define('WP_DEBUG', true); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); define( 'WP_DEBUG_LOG', true ); define( 'WP_AUTO_UPDATE_CORE', false ); # also safer: define( 'WP_DEBUG', true ); if ( WP_DEBUG ) { define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); define('SAVEQUERIES', true); } // save queries $wpdb define( 'SAVEQUERIES', true ); --------- selector tips https://www.w3schools.com/jquery/jquery_ref_selectors.asp --------- jQuery capsule ---------- (function( $ ) { "use strict"; $(document).ready( function(){ $(function() { $('.quantity').addClass('buttons_added').append('<div class="plus"></div>').prepend('<div class="minus"></div>'); console.log('ok'); }); }); })(jQuery); -- post_id if ( ! $post_id ) { global $post; $post_id = $post->ID; } --2021-08-11 22:08:52 | stat: 1 | filed as: OTHER Click to get sharing URL: share snippet 41