<?php
global $post;
$post = get_post('ID_ЗАПИСИ');
if($post) :
setup_postdata($post);
?>
<div class="col-md-4 col-sm-4 col-xs-6 howWeDo__innerItem">
<div class="howWeDo__item">
<div class="howWeDo__header"><img src="<?php bloginfo('template_directory'); ?>/img/icons/howWeDo_1.png" alt="" class="howWeDo__img"></div>
<div class="howWeDo__footer"><?php the_content(); ?></div>
</div>
</div>
<?php wp_reset_query(); endif; ?>
В яндексе вроде более менее всё ищет по запросу, а вот с гуглом вообще беда.
И как добиться вот такого поисковой выдачи вот такого формата?
<?php
$cats = get_the_category();
$args = array(
'post_type' => 'article',
'posts_per_page' => 5,
'cat' => $cats[0]->term_id,
'meta_query' => array(
array(
'key' => 'recommended_article',
'value' => '1',
'compare' => '='
)
)
);
$query = new WP_Query( $args );
?>
<?php if( $query->have_posts() ) : while( $query->have_posts() ) : $query->the_post(); ?>
<!--Мой ХТМЛ-->
<?php endwhile; endif; wp_reset_query(); ?>
<div id="mk-button-11" class="mk-button-container _ relative mk-animate-element flip-x block text-center twf mk-in-viewport">
<a onclick="yaCounter39276445.reachGoal('buyclick');" href="#" target="_self" class="mk-button js-smooth-scroll mk-button--dimension-flat mk-button--size-large mk-button--corner-pointed text-color-dark _ relative text-center font-weight-700 no-backface letter-spacing-2 inline">
<span class="mk-button--text">ПОЛУЧИТЬ БИЛЕТ</span>
</a>
</div>
update_field( 'field_56032f2c65c16', 'text', $post_id );
<?php
global $post;
$post_id = 9;
$post = get_post($post_id);
setup_postdata($post);
?>
<?php the_post_thumbnail(); ?>
<h3><?php the_title(); ?></h3>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" class="btn">Подробнее о нас</a>
<?php wp_reset_query(); ?>
<img src="<?php echo get_template_directory_uri(); ?>/logog.png" alt="">
add_filter('manage_post_posts_columns', 'denisco_columns_head', 10);
add_action('manage_post_posts_custom_column', 'denisco_columns_content', 10, 2);
function denisco_columns_head($defaults) {
$defaults['post_views'] = 'Просмотры';
unset($defaults['date']);
return $defaults;
}
function denisco_columns_content($column_name, $post_ID) {
if ($column_name == 'post_views') {
echo get_post_meta($post_ID, '_post_views', true);
//или the_field('_post_views', $post_ID); для ACF
}
}
<div class="front-map-overlay" onclick="style.pointerEvents='none'" style="pointer-events: none;"></div>
.front-map-overlay {
position: relative;
height: 400px;
top: 400px;
margin-top: -400px;
z-index: 2;
}
function register_foundation_style() {
if ( is_page( '28' ) ) {
wp_enqueue_style( 'foundation', get_stylesheet_directory_uri() . '/foundation/css/foundation.min.css' );
}
}
add_action( 'wp_enqueue_scripts', 'register_foundation_style' );