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_filter( 'mylisting/edit/hide_yoast_metabox', '__return_false' ); |
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 | |
// Hide past events from Explore page. | |
add_filter( 'get_job_listings_query_args', function( $args ) { | |
$listing_types = ['event']; | |
if ( empty( $args['meta_query'] ) || empty( $args['meta_query']['listing_type_query'] ) ) { | |
return $args; | |
} | |
// Only apply to the listing types defined in $listing_types. |
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 | |
// Careful: Field visibility options will be ignored with this flow | |
add_filter( 'pre_option_job_manager_paid_listings_flow', function() { | |
return 'after'; | |
}, 100 ); |
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_action( 'wp_enqueue_scripts', function() { | |
if ( is_user_logged_in() && count_user_posts( get_current_user_id(), 'job_listing' ) >= 1 ) { | |
wp_add_inline_style( 'theme-styles-default', '.c27-main-header .header-button { display: none !important; }' ); | |
} | |
}, 500 ); |
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 | |
// Display Expired listings in search results | |
add_filter( 'get_job_listings_query_args', function( $args ) { | |
$args['post_status'] = [ 'publish', 'expired' ]; | |
return $args; | |
}, 100 ); | |
// Make Expired listings content public | |
add_action( 'init', function() { |
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_action( 'init', function() { | |
global $wp_post_statuses; | |
if ( is_array( $wp_post_statuses ) && ! empty( $wp_post_statuses['expired'] ) ) { | |
$wp_post_statuses['expired']->public = true; | |
} | |
}, 100 ); |
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
jQuery('a[href="#sign-in-modal"]').attr('data-toggle', 'modal').attr('data-target', '#sign-in-modal'); |
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
// 1. Install and activate MyListing child theme | |
// 2. In WP Admin > Appearance > Editor, add the below code in functions.php file, at the end of the file. | |
add_action( 'wp_enqueue_scripts', function() { | |
wp_deregister_script( 'c27-google-maps' ); | |
wp_enqueue_script( 'c27-google-maps', 'https://maps.googleapis.com/maps/api/js?key=' . c27()->get_setting('general_google_maps_api_key') . '&libraries=places&v=3', [], null, true ); | |
}, 100 ); |
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_action( 'template_redirect', function() { | |
global $wp; | |
if ( isset( $wp->query_vars['customer-logout'] ) ) { | |
wp_redirect( get_permalink( $page_id ) ); | |
exit; | |
} | |
} ); |
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_filter( 'job_manager_job_dashboard_columns', function( $columns ) { | |
$columns['product_type'] = 'Product Type'; | |
return $columns; | |
} ); | |
add_action( 'job_manager_job_dashboard_column_product_type', function( $listing ) { | |
if ( ! $listing->_package_id || ! ( $product = wc_get_product( $listing->_package_id ) ) ) { | |
return false; |