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'];
For example I want to add a ” Home Slider ” post type. Below is the perfect codes. Just copy and paste it into your functions.php add_action( 'init', 'home_slider_post_type' ); function home_slider_post_type() { $labels = array( 'name' => _x( 'Home slider' ), 'singular_name' => _x( 'Home Slider' ), 'menu_name' => _x( 'Home Slider' ), 'name_admin_bar'…
How to solve Jquery on click inside or outside the div element ? Just copy the codes below to your script. $( document ).click( function( e ){ var mde = $( '.my-div-element' ); if( ! mde.is( e.target ) && mde.has( e.target ).length === 0 && mde.length ){ // I'm clicking outside of my div element…
Paste the codes below into your function.php add_action('get_header','remove_title'); function remove_title(){ if( is_home() || is_front_page() ){ remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); } }
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.
Default function add_filter( 'get_search_form', 'genesis_search_form' ); function genesis_search_form() { $search_text = get_search_query() ? apply_filters( 'the_search_query', get_search_query() ) : apply_filters( 'genesis_search_text', __( 'Search this website', 'genesis' ) . '…' ); $button_text = apply_filters( 'genesis_search_button_text', esc_attr__( 'Search', 'genesis' ) ); $onfocus = "if ('" . esc_js( $search_text ) . "' === this.value) {this.value = '';}"; $onblur =…
Uncaught (in promise) TypeError: Illegal invocation error using jQuery ajax code. I don’t understand how this ajax JS parameters works but digging a deep research about the error shows me some correct solution. Here’s the code of mine that has `Uncaught (in promise) TypeError: Illegal invocation` error. JS code that has `Uncaught (in promise) TypeError:…