this.setState({
productToCart: {
...this.state.productToCart,
color,
},
});
<form method="get" action="<?php echo esc_url( home_url( '/' ) ); ?>" id="topsearch">
<input type="text" value="<?php echo get_search_query(); ?>" placeholder="Поиск по сайту" name="s" id="tsearch">
<button type="submit" id="topsubmit">
<img src="<?php get_template_directory_uri(); ?>/assets/img/header/search.png">
</button>
</form>
register_post_type( 'kosmetologiya',
array(
'labels' => array(
'name' => __( 'Косметология' ),
'singular_name' => __( 'Косметологические процедуры' )
),
'public' => true,
'has_archive' => true,
'add_new' => 'Добавить процедуру',
'menu_position' => 5,
'hierarchical' => true,
'supports' => array('title', 'editor', 'thumbnail', 'post-formats', 'excerpt', 'custom-fields', 'page-attributes' ),
)
);
<?php
$args = array(
'post_type' => 'akcii',
'posts_per_page' => 6,
);
$recent = new WP_Query( $args );
while ( $recent->have_posts() ) {
$recent->the_post();
?>
<div class="col-12 col-sm-6 col-lg-4">
<div class="main-articles_block">
<div class="main-articles_header"><?php echo get_the_title(); ?></div>
<a href="<?php echo get_permalink();?>">
<?php the_post_thumbnail('actions-preview', ''); ?>
</a>
<div class="main-articles_descr">
<div>
<a href="<?php echo get_permalink(); ?>">Далеко-далеко за словесными горами в стране, гласных и согласных живут рыбные тексты.</a>
</div>
</div>
</div>
</div>
<?php
}
wp_reset_postdata();
wp_reset_query();
?>
the_title('', '', false)