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'];
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({}); }); });…
Dequeue or deregister a style or script in WordPress is now easy and no need more time to find solutions online. Example 1: I want to remove styles using `dequeue` function. If you can see, I want to remove the `anton-accordion-style-css` styles. Please see codes below. <link rel='stylesheet' id='anton-accordion-style-css' href='https://www.anthonypagaycarbon.com/wp-content/plugins/4nton-accordion/assets/css/style.css?ver=4.9.1' type='text/css' media='all' /> Code to…
add_filter( 'the_content', 'hidden_image_before_content' ); function hidden_image_before_content( $content ){ global $post; if ( is_singular('post') && has_post_thumbnail() ){ $content = preg_replace( "/<p>/", '<p class="hide">' . get_the_post_thumbnail($post->ID, 'full') . '</p><p>', $content, 1 ); } return $content; }
INSTALL WORDPRESS | WEB DEVELOPMENT | WEBSITE | XAMP | HOW TO CREATE A WEBSITE. EDUCATIONAL VIDEO PARA SA GUSTO TUMUKLAS NG MGA BAGONG KAALAMAN KUNG PANU GUMAWA NG WEBSITES. PAKI-SHARE PO VIDEO NG MARAMI TAYONG MATULUNGAN AT MABIGYAN NG ONLINE SKILLS. MARAMI PA TAYONG PWEDE IBAHAGI SA INYO. LINKS: PERSONAL WEBSITE: https://www.anthonypagaycarbon.com/ XAMP DOWNLOAD:…
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…