 
  
  Есть сайт на WP с перечнем стран.
 
  
  if(!empty($blog[0]->path)&&$blog[0]->path!=="/"){
//фомируете ссылку с помощью is_ssl() и $_SERVER['HTTP_HOST']
//отдаете wp_redirect( $url );
//exit();
} 
  
  archive-{post-type}.php
The archive post type template is used when visitors request a custom post type archive. For example, archive-acme_product.php would be used for displaying an archive of posts from the custom post type named acme_product. The archive.php template file is used if the archive-{post-type}.php is not present.
 
  
  <?php
if(!defined('ABSPATH')){exit;}
get_header();
	if(have_posts()):
		while(have_posts()):the_post();
			get_template_part('template_parts/templates/teacher','page');
		endwhile;
	else:get_template_part('template_parts/templates/none','page');endif;
get_sidebar();get_footer(); 
  
  стоит ли включать...
 
  
  И на странице "Учителя" все это дело прекрасно выводится через обычный цикл.
<?php
if(!defined('ABSPATH')){exit;}
get_header();
	if(have_posts()):
		while(have_posts()):the_post();
			get_template_part('template_parts/templates/teacher','page');
		endwhile;
	else:get_template_part('template_parts/templates/none','page');endif;
get_sidebar();get_footer();Но тут захотелось сделать больше маневренности, чтобы контент менеджер через админку выбирал и выводил именно тех 3-х учителей, которых он хочет.
На главной странице стайта есть секция
 
  
   
  
   
  
  wp_is_mobile() + фильтр wp_nav_menu_items.wp_nav_menu(array('theme_location'=>'header_menu','container'=>'div','container_id'=>'menu','container_class'=>'menu','menu_class'=>'menu_class'));
if(! wp_is_mobile()){ //если не мобила
// кнопка 
}add_filter( 'wp_nav_menu_items', 'change_nav_menu_items', 10, 2 );
function change_nav_menu_items( $items, $args ) {
	if ( 'header_menu' == $args->theme_location && wp_is_mobile() ) {
		$items .= '<li>' . кнопка . '</li>';
	}
	return $items;
}if(wp_is_mobile()){
echo Menu::Ret();
}
wp_nav_menu(array('theme_location'=>'osnova','container'=>'div','container_id'=>'menu','container_class'=>'menu','menu_class'=>'menu_class'));

 
  
   
  
  или в общую строку
$out="";
foreach ( $results as $result ) {
$pise = $result->Цена;
$tarif = $result->Товар;
$magaz = $result->Магазин;
  $out.="<div>Имя: <b>$tarif</b> <br> Цена: $pise руб. в магазине $magaz <br><br></div>";
}
return $out; 
  
   
  
   
  
  Где найти годный гайд по установке WordPress в LEMP?
 
  
   
  
  
...закрываем основную разметку...