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
function cl_tweak_carousel( $extra_data ) { | |
global $post; | |
if ( $post->ID == 23 ) { | |
$extra_data = array(); | |
} | |
return $extra_data; | |
} | |
add_filter( 'jp_carousel_add_data_to_container', 'cl_tweak_carousel'); |
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
function listing_published_send_email($post_id) { | |
if( 'job_listing' != get_post_type( $post_id ) ) { | |
return; | |
} | |
$post = get_post($post_id); | |
$author = get_userdata($post->post_author); | |
$message = " | |
Hi ".$author->display_name.", | |
Your listing, ".$post->post_title." has just been approved at ".get_permalink( $post_id ).". Well done! |
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
// Add field to admin | |
add_filter( 'resume_manager_resume_fields', 'wpjms_admin_resume_form_fields' ); | |
function wpjms_admin_resume_form_fields( $fields ) { | |
$fields['_candidate_color'] = array( | |
'label' => __( 'Favourite Color', 'job_manager' ), | |
'type' => 'text', | |
'placeholder' => __( 'Blue', 'job_manager' ), | |
'description' => '', | |
'priority' => 1 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// Add product categories to the "Product" breadcrumb in WooCommerce. | |
// Get breadcrumbs on product pages that read: Home > Shop > Product category > Product Name | |
add_filter( 'woo_breadcrumbs_trail', 'woo_custom_breadcrumbs_trail_add_product_categories', 20 ); | |
function woo_custom_breadcrumbs_trail_add_product_categories ( $trail ) { | |
if ( ( get_post_type() == 'product' ) && is_singular() ) { | |
global $post; | |
$taxonomy = 'product_cat'; |