Get the current post parent category ID
How to get the current post parent category ID? Just copy the codes below and paste this your template.
global $post; $category = get_the_category( get_the_ID() ); $parent = $category[0]->term_id
Remove ” Edit ” page / post link when logged in add_filter( 'genesis_edit_post_link', function(){ return false; }); Default functions <?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child…
Get the sub category of the current product category page. This code is applied if you are viewing the product archive page. The codes below and a sample category hierarchy list. Example: Category Parent Category 1 Category 2 Category 3 Category 4 Category 1.1 Category 2.1 Category 3.1 Category 4.1 Here’s a code: $category_object =…
Dequeue or remove Gravity Forms style or css in your WordPress site. Common styles of Gravity Forms is `formreset.css`, `datepicker.css`, `formsmain.css`, `readyclass.css`, and `browsers.css`. Gravity Forms has action called `gform_enqueue_scripts`, you can visit the link for more information. <link rel='stylesheet' id='gforms_reset_css-css' href='http://example.com/wp-content/plugins/gravityforms/css/formreset.css?ver=1.7.11' type='text/css' media='all' /> <link rel='stylesheet' id='gforms_datepicker_css-css' href='http://example.com/wp-content/plugins/gravityforms/css/datepicker.css?ver=1.7.11' type='text/css' media='all' /> <link rel='stylesheet' id='gforms_formsmain_css-css'…
How to set up woocommerce product retail map discount? Copy and paste the codes below to your functions.php Note: to get the $retail_map, make sure you have retail_map key in each products. You can add custom fields with the name retail_map and put a value. function woocommerce_get_custom_price($price, $product){ $reg_price = get_post_meta( $product->id, '_regular_price', true );…
How to Zoom in effects in hover? Copy the HTML / CSS structure and paste it into your editor. Example: HTML <a class="zoom-in-hover" href="#"> <span class="group"> <img src="https://www.anthonypagaycarbon.com/wp-content/plugins/wordpress-popular-posts/no_thumb.jpg" alt="Zoom in effects in hover" /> </span> </a> CSS .zoom-in-hover { overflow: hidden; display: inline-block; text-align: center; } .zoom-in-hover .group { -webkit-transition: all 0.3s ease-in-out; -moz-transition: all…