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'];
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(…
Collection of Genesis header hooks and customization’s How to remove page title? add_action(‘get_header’,’remove_title’); function remove_title(){ 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 ); }
How to add rtMedia custom settings just like the example image above? Just add the codes to your functions.php of your theme. add_filter( ‘rtmedia_add_settings_sub_tabs’, ‘wdes_music_rtmedia_pro_settings_tabs_content’ ); function wdes_music_rtmedia_pro_settings_tabs_content( $tabs ){ $tabs[] = array( ‘href’ => ‘#rtmedia-music-genre’, ‘icon’ => ‘dashicons-admin-tools’, ‘title’ => esc_html__( ‘Music Genre’ ), ‘name’ => esc_html__( ‘Music Genre’ ), ‘callback’ => ‘wdes_music_genre_settings_callback’, );…
Put this code to your .htaccess file. <FilesMatch "\\.(js|css|html|htm|php|xml)$"> SetOutputFilter DEFLATE </FilesMatch> <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </IfModule> # Leverage browser caching <FilesMatch "\.(woff|ico|pdf|jpg|jpeg|png|gif|js)$"> Header set Cache-Control "max-age=864000, public, must-revalidate" </FilesMatch> or <IfModule mod_expires.c> ExpiresActive On…
Customize rtmedia gallery ( media-gallery-item.php ) with additional display like image, audio, video, etc. Are you having a problem adding custom information on the media gallery item? You don’t have to worry now, the codes below is the solution. In my example, I want to add an audio player and the same time this is…
Copy the codes below to your functions.php add_filter(‘rtmedia_plupload_files_filter’, ‘rt_custom_allowed_types’, 10, 1); function rt_custom_allowed_types( $types ){ global $bp; if ( $bp->current_component == ‘activity’ && isset( $types[0] ) && isset( $types[0][’extensions’] ) ) { $types[0][’extensions’] = ‘jpg,jpeg,png,gif’; } return $types; } For more information please read this article https://rtmedia.io/docs/developers/allow-custom-media-types/