WordPress codex for page
How to get the current page slug?
global $post; $slug = get_post( $post )->post_name;
Question: How to use WDES Responsive popup in revolution slider? Answer: You can add a new layer in revslider and put the “[wdes-popup-title id=”popup_id”] ” inside the new layer. Place the “[wdes-popup-content id=”569″]” in the footer or in the page editor.
How to fix this kind of error? This is showing on your console of a browser. adsbygoogle.js:35 Uncaught TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them. With this codes below, your problem is solve. <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> jQuery(document).ready(function($){ $(‘ins’).each(function(){ (adsbygoogle = window.adsbygoogle || []).push({}); }); });…
How to get the parameter value or key value on the the window location (page URL)? If you have this URL “examplesite.com/?debug=1” and thinking how to get the value of debug parameter, the codes below is the answer. jQuery( document ).ready( function($){ // Example URL is examplesite.com/?debug=1 var getPostValue = function getPostValue(key) { var pageURL…
How to update BuddyPress cover image size? Just copy and paste the codes below to your functions.php add_filter( ‘bp_before_xprofile_cover_image_settings_parse_args’, ‘swifter_xprofile_cover_image’, 10, 1 ); function bp_legacy_theme_cover_image_css_2( $settings = array() ) { $theme_handle = ‘bp-child-css’; $settings[’theme_handle’] = $theme_handle; $settings[’callback’] = ‘bp_legacy_theme_cover_image_2’; return $settings; } function bp_legacy_theme_cover_image_2( $params = array() ) { if ( empty( $params ) )…
How to replace Woocommerce placeholder image URL? Just copy the codes below. add_filter( ‘woocommerce_placeholder_img_src’, function( $classes ){ if( !is_product() ) return; // this code is intended to single product only. Remove this for general changes. return get_bloginfo( ‘url’ ) . ‘/wp-content/uploads/2016/03/placeholder.jpg’; } );
Uncaught TypeError: grecaptcha.render is not a function console error is showing if the recaptcha api.js is not enqueue or the `grecaptcha.render` is fire before the recaptcha api.js is being enqueue. See the JS library link below. https://www.google.com/recaptcha/api.js?hl=en&render=explicit I’m having this error when I use the Gravity Form captcha field. As I explained above, that is…