This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add WooCommerce Conditional Logic | |
function jm_acf_woo_product_filter($choices) | |
{ | |
if (!isset($choices['WooCommerce'])) { | |
$new_choices = array(); | |
foreach ($choices as $key => $value) { | |
$new_choices[$key] = $value; | |
if ($key == 'Post') { // position in the drop down in thios case after Post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create a radio button field and set it to horizontal | |
* Add each choice with image as label like beow | |
* animation : <img src="/wp-content/themes/cobaltdesign/img/animation.svg" /> | |
* Change $field_name in the acf_icon_css function to what you called your theme | |
*/ | |
function acf_icon_css() | |
{ | |
$field_name = 'expertise_icon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Change core category to Channel | |
*/ | |
if( !function_exists('wcd_rename_category_theme') ) { | |
function wcd_rename_category_theme() { | |
$singular_name = 'Channel'; | |
$plural_name = 'Channels'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: WCD Add Customizer Back | |
*/ | |
function wcd_add_customizer_back() | |
{ | |
if (!gutenberg_is_fse_theme()) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function update_custom_terms($post_id) { | |
/** | |
* Define taxonomies | |
*/ | |
$make = 'make'; | |
$model = 'model'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('ABSPATH') || exit; | |
get_header('shop'); | |
$rubs = get_queried_object(); | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#generate-slideout-menu { | |
left: -100vw; | |
top: -100vh; | |
opacity: 1; | |
border-bottom-right-radius: 100%; | |
-webkit-transition: left 0.5s ease-in, top 0.5s ease-in, border-radius 0.7s ease-in; | |
transition: left 0.5s ease-in, top 0.5s ease-in, border-radius 0.7s ease-in; | |
} | |
#generate-slideout-menu.is-open { | |
left: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Updated and tested with GeneratePressVersion: 2.4.2 **/ | |
/** | |
* Check if logo is svg and output svg code instead of image | |
*/ | |
function generate_construct_logo() { | |
$logo_url = ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) ? wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' ) : false; | |
$logo_url = ( $logo_url ) ? $logo_url[0] : generate_get_option( 'logo' ); | |
$logo_url = esc_url( apply_filters( 'generate_logo', $logo_url ) ); |
NewerOlder