$keyg = get_post_field( 'банкс', get_the_ID() );
<?php if ( in_category( array('news', 'articles') )) { ?>
<h4><?php echo get_the_author() ?></h4>
<?php } ?>
<body <?php body_class(); ?>>
и посмотрите, какой класс шаблона будет там.function my_theme_assets() {
wp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/slick/slick.css' );
wp_enqueue_script( 'slick', get_template_directory_uri() . '/assets/slick/slick.js', array('jquery'), null, true );
}
add_action( 'wp_enqueue_scripts', 'my_theme_assets' );
function post_by_slug( $atts ) {
$a = shortcode_atts( array(
'slug' => ''
), $atts );
$slug = explode(',', $a['slug']);
$args = array(
'post_name__in' => $slug,
'post_type' => 'page',
'post_status' => 'publish',
);
$html = '';
$my_posts = get_posts($args);
if( $my_posts ) :
foreach( $my_posts as $post ) :
echo $post->post_title;
endforeach;
endif;
return $html;
}
add_shortcode( 'post_by_slug', 'post_by_slug' );