<div class="faq-wrapper">
<?php $term = get_queried_object(); ?>
<div class="faq-col col">
<?php if (have_rows('faq', $term)): ?>
<?php while (have_rows('faq', $term)) : the_row(); ?>
<div class="faq-item">
<h4 class="faq-title">
<?php the_sub_field('question'); ?>
</h4>
<p class="faq-content">
<?php the_sub_field('answer'); ?>
</p>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<div class="picture">
<img src="<?php bloginfo('template_url')?>/images/dest/faq.png" alt="">
</div>
</div>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/new-header.css" type="text/css"/>
// правильный способ подключить стили и скрипты
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
// add_action('wp_print_styles', 'theme_name_scripts'); // можно использовать этот хук он более поздний
function theme_name_scripts() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}
document.addEventListener( 'wpcf7submit', function( event ) {
if ( '123' == event.detail.contactFormId ) {
alert( "The contact form ID is 123." );
// do something productive
}
}, false );
<?php
$terms = get_terms( [
'taxonomy' => 'services_tax',
'hide_empty' => false,
] );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
$icon = pods_field( 'services_tax', $term->term_id, 'images', false);
$icon_url = $icon[0]['guid'];
$icon_thumb = pods_image_url ( $icon_url, 'large', 0, false ) ;
$term_link = get_term_link($term);
?>
<div class="services-item">
<a href="<?php echo $term_link;?>">
<img src="<?php echo $icon_thumb; ?>" alt="">
</a>
</div>
<?php
}
}
?>