| | |
| | | |
| | | // Buffer output |
| | | if (is_tax()) { |
| | | switch (get_queried_object()->taxonomy) { |
| | | case BASE.'shop': |
| | | return jvbRenderShopSummary(); |
| | | default: |
| | | return jvbRenderTermSummary(); |
| | | } |
| | | return match (get_queried_object()->taxonomy) { |
| | | BASE . 'shop' => jvbRenderShopSummary(), |
| | | default => jvbRenderTermSummary(), |
| | | }; |
| | | } elseif (is_singular()) { |
| | | return jvbRenderArtistSummary(); |
| | | } |
| | |
| | | <h2>Contact <?=$artist['name']?></h2> |
| | | <?php |
| | | echo jvbRenderContactInfo($current->ID, 'post'); |
| | | echo jvbRenderLinks($current->ID, 'post'); |
| | | echo jvbRenderLinks($current->ID); |
| | | ?> |
| | | </section> |
| | | <?php |
| | |
| | | { |
| | | $current = get_queried_object(); |
| | | |
| | | $cache = Cache::for('shop_bio', WEEK_IN_SECONDS)->connect('taxonomy'); |
| | | $cache = Cache::for('shop_bio', 'term',WEEK_IN_SECONDS); |
| | | $key = $current->term_id; |
| | | $cached = $cache->get($key); |
| | | if ($cached !== false) { |
| | |
| | | function jvbRenderTermSummary() |
| | | { |
| | | $current = get_queried_object(); |
| | | $cache = Cache::for('term_summary', WEEK_IN_SECONDS)->connect('taxonomy'); |
| | | $cache = Cache::for('term_summary', 'term',WEEK_IN_SECONDS); |
| | | $key = $current->ID; |
| | | $cached = $cache->get($key); |
| | | if ($cached !== false) { |
| | |
| | | |
| | | ob_start(); |
| | | $tax = jvbNoBase($current->taxonomy); |
| | | switch ($tax) { |
| | | case 'style': |
| | | $title = 'Tattoo Artists'; |
| | | break; |
| | | case 'theme': |
| | | $title = 'Tattoos'; |
| | | break; |
| | | default: |
| | | $title = ''; |
| | | } |
| | | $title = match ($tax) { |
| | | 'style' => 'Tattoo Artists', |
| | | 'theme' => 'Tattoos', |
| | | default => '', |
| | | }; |
| | | |
| | | $meta = Meta::forTerm($current->ID); |
| | | $fields = $meta->getAll(); |