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 soft_crop( $sizes ) { | |
$sizes['medium'] = array( | |
'width' => 300, | |
'height' => 0, | |
'crop' => true, | |
); | |
return $sizes; | |
} | |
add_filter( 'intermediate_image_sizes_advanced', 'soft_crop' ); |
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
/** | |
* Adds block template to single custom post type Careers posts. | |
*/ | |
function careers_block_template() { | |
$post_type_object = get_post_type_object( 'careers' ); | |
$post_type_object->template = array( | |
array( 'acf/job-location' ), | |
array( 'acf/job-description' ), | |
array( 'acf/job-role' ), |
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
$singular_name = 'Book'; // Enter the singular name for your new post type within the quotes | |
$plural_name = 'Books'; // Enter the plural name of your new post type within the quotes | |
function divi_projects_rename() { | |
global $wp_post_types; | |
global $singular_name; | |
global $plural_name; | |
$labels = $wp_post_types['project']->labels; |
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
if( function_exists('acf_add_options_page') ) { | |
$page = array( | |
'page_title' => 'Header', | |
'menu_title' => 'Header', | |
'menu_slug' => 'header', | |
'capability' => 'edit_posts', | |
'redirect' => false, | |
'position' => '3.3' | |
); |