<?php if(get_field( "land" )) : ?>
<li><span class="il">Страна</span><span class="ir"><?php echo $value = get_field( "land" ); ?></span></li>
<?php endif; ?>
<?php echo $value = get_field( "land" ); ?>
можно использовать <?php the_field( "land" ); ?>
<?php the_field('telumber', 15); ?>
add_action('wpcf7_before_send_mail', 'denisco_wpcf7_before_send_mail');
function denisco_wpcf7_before_send_mail($contact_form) {
$submission = WPCF7_Submission::get_instance();
$data = & $submission->get_posted_data();
$employee_name = $data['employee-name'];
$post = get_page_by_title($employee_name, OBJECT, 'employee');
$email = get_post_meta($post->ID, 'employee_email', true);
if ($email) {
$mail = $contact_form->prop('mail');
$mail['recipient'] = $email;
$contact_form->set_properties(array('mail' => $mail));
}
}
$categories = get_the_category();
if ( ! empty( $categories ) ) {
echo esc_html( $categories[0]->name );
}
$categories = get_the_category();
if ( ! empty( $categories ) ) {
if($categories[0]->term_id == 1) {
//блок 1
} else if($categories[0]->term_id == 2) {
//блок 2
}
}
<?php $props = CFS()->get_field_info( 'my_select' ); ?>
<select>
<?php foreach ( $props['options']['choices'] as $value => $label ) : ?>
<option value="<?php echo $value; ?>"><?php echo $label; ?></option>
<?php endforeach; ?>
</select>
$args = array(
'meta_key' => 'foobar',
'posts_per_page' => '-1'
);
$meta_posts = get_posts( $args );
$meta_posts_count = count( $meta_posts );
echo $meta_posts_count;
wp_reset_query();
$args = array(
'post_type' => 'book',
'meta_key' => 'foobar',
'posts_per_page' => '-1'
);
$meta_posts = get_posts( $args );
$meta_posts_count = count( $meta_posts );
echo $meta_posts_count;
wp_reset_query();