1<?php // ACF in Taxonomy
2
3// get the current taxonomy term
4$term = get_queried_object();
5
6
7// vars
8$image = get_field('image', $term);
9$color = get_field('color', $term);
10
11?>
12<style type="text/css">
13
14 .entry-title a {
15 color: <?php echo $color; ?>;
16 }
17
18 <?php if( $image ): ?>
19 .site-header {
20 background-image: url(<?php echo $image['url']; ?>);
21 }
22 <?php endif; ?>
23
24</style>
25<div class="wrap">
26
27 <?php // Remaining template removed from example ?>
1<?php
2/**
3 * The template for displaying category archive pages
4 *
5 * @link https://codex.wordpress.org/Template_Hierarchy
6 *
7 * @package WordPress
8 * @subpackage Twenty_Seventeen
9 * @since 1.0
10 * @version 1.0
11 */
12
13get_header();
14
15
16// get the current taxonomy term
17$term = get_queried_object();
18
19
20// vars
21$image = get_field('image', $term);
22$color = get_field('color', $term);
23
24?>
25<style type="text/css">
26
27 .entry-title a {
28 color: <?php echo $color; ?>;
29 }
30
31 <?php if( $image ): ?>
32 .site-header {
33 background-image: url(<?php echo $image['url']; ?>);
34 }
35 <?php endif; ?>
36
37</style>
38<div class="wrap">
39
40 <?php // Remaining template removed from example ?>