diff --git a/404.php b/404.php index 6b38d02..2cad07b 100644 --- a/404.php +++ b/404.php @@ -9,8 +9,8 @@ get_header(); ?> - 404. - That's computer for Oops! Something went wrong! + 404. + That's computer for Oops! Something went wrong! diff --git a/archive.php b/archive.php index 8ae7761..c9ea7d0 100644 --- a/archive.php +++ b/archive.php @@ -9,9 +9,9 @@ get_header(); ?> - - . - + . + ) ); ?> - - - - + + + */ get_template_part( 'template-parts/content', get_post_format() ); // End the loop. - endwhile; + endwhile; // If no content, include the "No posts found" template. - else : - get_template_part( 'template-parts/content', 'none' ); - endif; - ?> - - - + + + diff --git a/page-experience-timeline.php b/page-experience-timeline.php index 676aee1..6446a05 100644 --- a/page-experience-timeline.php +++ b/page-experience-timeline.php @@ -22,10 +22,10 @@ get_header(); ?> * @return bool */ function within_dates( $role_start_date, $role_end_date ) { - $end_year = gmdate( 'Y' ); - $end_date = $end_year . '-12-31'; - $start_date = ( $end_year - 2 ) . '-01-01'; - $role_end_date = ( ! $role_end_date ) ? gmdate( 'Y-m-d' ) : ( ( $role_end_date > $end_date ) ? $end_date : $role_end_date ); + $end_year = gmdate( 'Y' ); + $end_date = $end_year . '-12-31'; + $start_date = ( $end_year - 2 ) . '-01-01'; + $role_end_date = ( ! $role_end_date ) ? gmdate( 'Y-m-d' ) : ( ( $role_end_date > $end_date ) ? $end_date : $role_end_date ); return ( ( ( strtotime( $role_start_date ) < strtotime( $end_date ) ) && ( strtotime( $role_start_date ) > strtotime( $start_date ) ) ) && ( strtotime( $role_end_date ) > strtotime( $start_date ) ) ); } @@ -106,7 +106,7 @@ function within_dates( $role_start_date, $role_end_date ) { $end_date = get_post_meta( get_the_ID(), 'end-date', true ); $is_current = ( ! $end_date || ( $end_date && $end_date > gmdate( 'Y-m-d' ) ) ) ? true : false; - $company = wp_get_object_terms( + $company = wp_get_object_terms( get_the_ID(), 'company', array( @@ -115,8 +115,8 @@ function within_dates( $role_start_date, $role_end_date ) { ); $role_title = htmlspecialchars_decode( strip_tags( get_the_title() ) ); - $start = get_the_date(); - $end = ( ! $end_date || ( $end_date && $end_date > gmdate( 'Y-m-d' ) ) ) ? gmdate( 'Y-m-d' ) : $end_date; + $start = get_the_date(); + $end = ( ! $end_date || ( $end_date && $end_date > gmdate( 'Y-m-d' ) ) ) ? gmdate( 'Y-m-d' ) : $end_date; ?> [ '', diff --git a/taxonomy-company.php b/taxonomy-company.php index 4fc381f..a8a3f33 100644 --- a/taxonomy-company.php +++ b/taxonomy-company.php @@ -11,44 +11,46 @@ name ) . '-->'; - $args = array( - 'post_type' => array( 'job' ), - 'tax_query' => array( - array( - 'taxonomy' => 'company', - 'field' => 'slug', - 'terms' => $company->slug, - ), - ), - 'posts_per_page' => -1, - ); + // Gets all of the roles attached to the given organisation. + $company = get_queried_object(); + echo ''; + // phpcs:disable WordPress.DB.SlowDBQuery.slow_db_query_tax_query + $args = array( + 'post_type' => array( 'job' ), + 'tax_query' => array( + array( + 'taxonomy' => 'company', + 'field' => 'slug', + 'terms' => $company->slug, + ), + ), + 'posts_per_page' => -1, + ); + // phpcs:enable - $loop = new WP_Query( $args ); + $loop = new WP_Query( $args ); ?> 'full' ) ); - // phpcs:enable - $company_name = get_queried_object()->name; + $company_logo = apply_filters( 'taxonomy-images-queried-term-image-url', '', array( 'image_size' => 'full' ) ); + // phpcs:enable + $company_name = get_queried_object()->name; ?> - - - - + + + 70 ) { $small = '2em'; } elseif ( strlen( $company_name ) > 35 ) { @@ -114,23 +116,23 @@ } ?> - - - - - + + + + + - - have_posts() ) : ?> - - - - - - - + + have_posts() ) : ?> + + + + + + + - parent != 0 ) { // phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores $parents = apply_filters( @@ -149,24 +151,24 @@ if ( count( $parents ) > 0 ) : ?> - Parent - + Parent + image_id )[0]; $colour = get_term_meta( $parent->term_id, 'color', true ); $colour = ( '' !== $colour ) ? $colour : 'transparent'; ?> - - term_id, 'company' )->name ); ?> + + term_id, 'company' )->name ); ?> - + - + - 0 ) : ?> - Child - + Child + image_id, 'detail' )[0]; @@ -188,14 +190,14 @@ $colour = ( '' !== $colour ) ? $colour : 'transparent'; ?> - term_id, 'company' )->name ); ?> + term_id, 'company' )->name ); ?> - + - No children. + No children. - + have_posts() ) : echo ''; - echo '' . wp_kses_post( ucwords( $current_section ) ) . 's View all ' . esc_html( $loop->post_count ) . ''; - echo ''; + echo '' . wp_kses_post( ucwords( $current_section ) ) . 's View all ' . esc_html( $loop->post_count ) . ''; + echo ''; while ( ( $loop->have_posts() ) && ( $i++ < 4 ) ) : $loop->the_post(); get_template_part( 'template-parts/content', get_post_format() ); - endwhile; - echo ''; + endwhile; + echo ''; echo ''; endif; } @@ -241,8 +243,8 @@ echo ''; while ( $loop->have_posts() ) : $loop->the_post(); - $url = esc_url( get_permalink() ); - echo '' . wp_kses_post( get_the_title() ) . ''; + $url = esc_url( get_permalink() ); + echo '' . wp_kses_post( get_the_title() ) . ''; endwhile; echo ''; else : @@ -279,8 +281,8 @@ echo ''; endif; ?> - - + +
computer
Oops! Something went wrong!
No children.