From 11bc5f6a77bc7f85d6fd37782c992053e6d1b1ea Mon Sep 17 00:00:00 2001 From: Mike Setzer Date: Wed, 24 Nov 2021 17:05:42 -0500 Subject: [PATCH] We Think Integrated Package - Mobile CSS fixes - FAQs templates added - Contacts templates added - Changes for Org Chart - Search function now searches pods post content fields --- functions.php | 41 +++++++++++++ src/css/hr_custom.css | 140 ++++++++++++++++++++++++++++++++++++++++++ template-contact.php | 104 ++++++++++++++++--------------- template-faqs.php | 33 ++++++++++ 4 files changed, 267 insertions(+), 51 deletions(-) create mode 100644 template-faqs.php diff --git a/functions.php b/functions.php index 5638e40..9a83a26 100644 --- a/functions.php +++ b/functions.php @@ -135,3 +135,44 @@ function ucf_rss_display_hr_after( $content, $items, $args ) { add_filter( 'ucf_rss_display_hr_after', 'ucf_rss_display_hr_after', 10, 3 ); } + +/* + * Function to fetch posts and search contents of custom post types +*/ + +add_action( 'pre_get_posts', 'search_metadata', 9 ); + +function search_metadata() { + if ( ! is_main_query() || ! is_search() ) { + return; + } + + add_filter( 'posts_join', function( $join ) { + global $wpdb; + return $join .' LEFT JOIN ' . $wpdb->postmeta . ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id '; + } ); + + add_filter( 'posts_where', function ( $where ) { + global $wpdb; + + $or = array( + "(".$wpdb->posts.".post_title LIKE $1)", + "(".$wpdb->postmeta.".meta_value LIKE $1)", + ); + + if ( is_main_query() && is_search() ) { + $where = preg_replace( + "/\(\s*".$wpdb->posts.".post_title\s+LIKE\s*(\'[^\']+\')\s*\)/", + implode( ' OR ', $or ), + $where + ); + } + + return $where; + } ); + + add_filter( 'posts_distinct', function () { + global $wpdb; + return "DISTINCT"; + } ); +} diff --git a/src/css/hr_custom.css b/src/css/hr_custom.css index 4acba77..f565ea4 100644 --- a/src/css/hr_custom.css +++ b/src/css/hr_custom.css @@ -3802,3 +3802,143 @@ video.homevideo { padding: 0px; height: auto; } + +/* linking APPLY circle to job */ +.ucf-rss-feed li a::before { + content: 'APPLY'; + background: #000; + border-radius: 100px; + width: 56px; + height: 56px; + border: 5px solid gold; + display: inline-block; + color: #fff!important; + font-size: 10px; + text-align: center; + font-weight: 700; + line-height: 46px; + float: left; + margin-right: 20px; + display: block!important; +} + +.ucf-rss-feed li a:hover:before { + content: 'APPLY'; + background: #ffc904; + color: #000!important; +} + +.ucf-rss-feed li:before { + display:none !important; +} + +.ucf-rss-feed li a .desc { + display:block; + margin-left:76px; +} + +/* fix video on prospective employee page */ +iframe { + height:initial !important; +} + +/* fix search results header display */ +body.search.search-results .hero.container-fluid { + padding-top: 50px; + height: auto !important; + padding-bottom: 50px; + background: black !important; +} + +body.search.search-results .hero .headerText h1 { + font-size: 30px; + font-weight: bold !important; +} + +body.search.search-results .hero .headerText h2 { + font-size: 16px; + background: #404040; +} + +/* style for learn more button on org chart */ +div#orgchartinfoblocks a.button { + margin-left: auto; + margin-right: auto; + display: block; + width: 190px; + text-align: center; + margin-top: 50px; +} + +/* fix spacing between items on az index page */ +body.page-template-template-azindex .content ul li { + margin-top: 0px !important; + margin-bottom: 0px !important; + line-height: 100% !important; +} + +/* fix line breaking for h3 */ +h3.title, +body.page-template-template-inside .container-fluid h3, +body.page-template-template-inside .container h3 { + line-break:initial !important; +} + +/* fix about orlando nav */ +@media (max-width:768px) { + div#about-orlando > .container { + padding-bottom: 0px !important; + } + + .aboutorlando .tabsContent { + margin-bottom: 60px !important; + } + + .aboutorlando > .row.tabs { + width: 100% !important; + max-width: 100% !important; + box-sizing: border-box !important; + left:15px !important; + } + + .aboutorlando > .row.tabs a { + display: block; + width: 100%; + padding: 0px !important; + text-align: center; + } + + .aboutorlando > .row.tabs:not(:nth-child(1)) a { + border-radius:0px; + } + + .aboutorlando .row.tabs:nth-child(4) { + top: 55px; + left: initial; + right:initial !important; + border-radius: 0px !important; + } + + .aboutorlando .row.tabs:nth-child(7) { + top: 89px; + left: initial; + right:initial !important; + border-radius: 0px !important; + } + + .aboutorlando .row.tabs:nth-child(10) { + top: 123px; + left: initial; + right:initial !important; + border-radius: 0px !important; + } + + .aboutorlando .row.tabsContent { + margin-top: 96px; + border-radius:10px; + } + + .aboutorlando .row.tabs>a img.arrow { + top:10px; + } +} diff --git a/template-contact.php b/template-contact.php index 2d718b2..5c29102 100644 --- a/template-contact.php +++ b/template-contact.php @@ -24,18 +24,18 @@ post_title; ?> - +
- +

- + - post_parent);?> - +

@@ -50,7 +50,7 @@