Allow SVG Files Upload (copy)

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading

Menu – Featured Upcoming Events

//Upcoming ONLY add_shortcode(‘UpcomingEvent’,’UpcomingEventAPI’); function UpcomingEventAPI($atts){ $atts = shortcode_atts(array(‘url’ => ”, ‘post-slug’ => ”, ‘tax-slug’ => ”, ‘tax-cat-id’ => ”, ‘icon’ => ”, ‘font-color’ => ” ), $atts, ‘featuredPost’); $response = wp_remote_get($atts[‘url’].’/wp-json/wp/v2/’.$atts[‘post-slug’].’?’.$atts[‘tax-slug’].’=’.$atts[‘tax-cat-id’].’&order=desc&per_page=1′, array( ‘timeout’ => 30 )); $response_body = json_decode($response[‘body’]); $content…Continue reading

Menu – Featured Careers API

// FEATURED CAREERS – WHY SPROUT MENU $date = date(‘Y-m-01’,strtotime(‘-6 month’)); $response = wp_safe_remote_get( ‘https://api.resumatorapi.com/v1/jobs/status/open/from_open_date/’.$date.’/?apikey=lnxTEuaoRaVG9JfKuYun1Nt6TY5rKzkp’, array( ‘timeout’ => 30 )); $responseBody = json_decode($response[‘body’]); $content = ”; foreach($responseBody as $index => $value){ if($index < 4){ $content .= ' ‘; if(empty($value->city) ||…Continue reading

Core HR Archive Caller

// Get the taxonomy’s terms $terms = get_terms( array( ‘taxonomy’ => ‘core-hr’, ) ); // Check if any term exists if ( ! empty( $terms ) && is_array( $terms ) ) { // Run a loop and print them all…Continue reading

Core HR Archive Caller

// Get the taxonomy’s terms $terms = get_terms( array( ‘taxonomy’ => ‘core-hr’, ) ); // Check if any term exists if ( ! empty( $terms ) && is_array( $terms ) ) { // Run a loop and print them all…Continue reading

Testimonials: Client Photo

$image = get_field(‘testimonial_image’); $size = ‘full’; // (thumbnail, medium, large, full or custom size) if( $image ) { echo wp_get_attachment_image( $image, $size ); }Continue reading