Product categories WordPress codex
How to get current product category slug?
global $wp_query; echo $wp_query->query_vars['product_cat'];
How to get current product category slug?
global $wp_query; echo $wp_query->query_vars['product_cat'];
Copy this code to your functions.php file add_action( ‘bp_setup_nav’, ‘wdes_bp_add_nav_item’, 100 ); function wdes_bp_add_nav_item(){ // Add music page in my profile menu item bp_core_new_nav_item( array( ‘name’ => ‘My Music’, ‘slug’ => ‘my-music’, ‘default_subnav_slug’ => ‘sub-music’, ‘screen_function’ => ‘my_music_screen_function’, ‘show_for_displayed_user’ => true, ‘position’ => 160 ) ); // Add upload music page in my profile menu…
How to make video iframe responive? Copy the CSS below and make sure that there is a ” iframe-wrap ” before the iframe element. CSS .iframe-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .iframe-wrap iframe, .iframe-wrap object, .iframe-wrap embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%;…
How to get paid membership pro membership level ID? Copy the codes below. function get_user_member_level_id( $userid ){ global $wpdb; return $wpdb->get_var( "SELECT membership_id FROM wp_pmpro_memberships_users WHERE user_id = $userid" ); } echo get_user_member_level_id( $userid );
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’; } );
Having trouble in Javo Directory WordPress theme? Currently the PHP class code that manage all the templating system of the Javo Directory WordPress theme. I’ll have a sample code on how to add new dashboard page using Javo Directory WordPress theme. In my case I’d like the `Add Listing` page to be displayed within dashboard…
First is you must have the browser.php in your current themes. If not, click here and create a file named browser.php in your current themes. Copy the codes below and place it into your function.php file. add_filter(‘body_class’,’browser_name_class’); function browser_name_class($classes) { $browser = new Browser(); $browser_detect_replace = str_replace( ‘ ‘, ‘-‘, $browser->getBrowser(‘browser_name:Browser:private’) ); $browser_name = strtolower(…