WordPress codex for page
How to get the current page slug?
global $post; $slug = get_post( $post )->post_name;
jQuery( document ).ready( function(){ var custom_timeout = ( function() { var timers = {}; return function ( callback, ms, uniqueId ) { if ( !uniqueId ) { uniqueId = "Don’t call this twice without a uniqueId"; } if ( timers[uniqueId] ) { clearTimeout ( timers[uniqueId] ); } timers[uniqueId] = setTimeout( callback, ms ); }; })();…
function woocommerce_shop_ordering_add_option( $sort_args ){ $orderby_value = isset( $_GET[’orderby’] ) ? woocommerce_clean( $_GET[’orderby’] ) : apply_filters( ‘woocommerce_default_catalog_orderby’, get_option( ‘woocommerce_default_catalog_orderby’ ) ); if ( ‘alphabetical’ == $orderby_value ) { $sort_args[’meta_key’] = ‘property_priority’; $sort_args[’orderby’] = ‘meta_value’; $sort_args[’order’] = ‘DESC’; } return $sort_args; } add_filter( ‘woocommerce_get_catalog_ordering_args’, ‘woocommerce_shop_ordering_add_option’ ); function woocommerce_catalog_orderby_add_option( $sortby ) { $sortby[’alphabetical’] = ‘Sort by STC’; return…
If this is happening on your end, try this troubleshooting. Check if your Gravity Form short code if is placed outside the wp_footer();. I guess the short code does not support any function outside the wp_footer();. You should put your Gravity Form short code before wp_footer();. Much better if it is placed on inside the…
How to add @mention in Buddypress single media page (or rtMedia single page)? Copy the codes below to your functions.php add_filter( ‘bp_get_activity_content’, ‘filter_bp_get_activity_content’, 10, 1 ); function filter_bp_get_activity_content( $content ) { global $bp, $wpdb; $mention_link = ”; $mention_dummy = ”; $at_all = array(); $at_mention = ”; $at_space = ”; $at_text = ”; $mention_dummy = $content;…
Dequeue or remove Gravity Forms style or css in your WordPress site. Common styles of Gravity Forms is `formreset.css`, `datepicker.css`, `formsmain.css`, `readyclass.css`, and `browsers.css`. Gravity Forms has action called `gform_enqueue_scripts`, you can visit the link for more information. <link rel=’stylesheet’ id=’gforms_reset_css-css’ href=’http://example.com/wp-content/plugins/gravityforms/css/formreset.css?ver=1.7.11′ type=’text/css’ media=’all’ /> <link rel=’stylesheet’ id=’gforms_datepicker_css-css’ href=’http://example.com/wp-content/plugins/gravityforms/css/datepicker.css?ver=1.7.11′ type=’text/css’ media=’all’ /> <link rel=’stylesheet’ id=’gforms_formsmain_css-css’…
PHP Notice: unserialize(): Error at offset of bytes is showing when you edited the serialized text. In my end, I have serialized text and change the text. This will mess up serialized character count. This error show on my end `PHP Notice: unserialize(): Error at offset 2025 of 3529 bytes` and to fix the issue,…