add graduation packet
This commit is contained in:
parent
4114e9f400
commit
83f8350f52
@ -6,28 +6,39 @@
|
||||
</div>
|
||||
|
||||
<div class="row packets center">
|
||||
<div class="col-4 packet">
|
||||
<?php hm_get_template_part('parts/landings/graduation/offer-packet', array(
|
||||
'title' => 'Базовый',
|
||||
'price' => 900,
|
||||
'description' => ['1 квест', '3 часа лофта', 'Украшение шарами', 'Аниматор', 'Диплом выпускника', '2 проститутки', '3 грамма кокаина и гашиша']
|
||||
)); ?>
|
||||
</div>
|
||||
<div class="col-4 packet">
|
||||
<?php hm_get_template_part('parts/landings/graduation/offer-packet', array(
|
||||
'title' => 'Стандарт',
|
||||
'price' => 1390,
|
||||
'description' => ['2 квест', '3 часа лофта', 'Украшение шарами', 'Аниматор', 'Диплом выпускника']
|
||||
)); ?>
|
||||
</div>
|
||||
<div class="col-4 packet">
|
||||
|
||||
<?php hm_get_template_part('parts/landings/graduation/offer-packet', array(
|
||||
'title' => 'VIP',
|
||||
'price' => 2490,
|
||||
'description' => ['2 квест', '3 часа лофта', 'Украшение шарами', 'Аниматор', 'Диплом выпускника']
|
||||
)); ?>
|
||||
<?php
|
||||
$posts = get_posts( array(
|
||||
'category' => 0,
|
||||
'orderby' => 'date',
|
||||
'order' => 'ASC',
|
||||
'include' => array(),
|
||||
'exclude' => array(),
|
||||
'meta_key' => '',
|
||||
'meta_value' =>'',
|
||||
'post_type' => 'armanty_graduation',
|
||||
'posts_per_page' => 3,
|
||||
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
|
||||
) );
|
||||
|
||||
foreach( $posts as $post ){
|
||||
setup_postdata($post);?>
|
||||
<div class="col-4 packet">
|
||||
<?php
|
||||
$composition = get_field('graduation_offer_composition');
|
||||
$arr = [];
|
||||
foreach ($composition as $point => $value) {
|
||||
$arr[] = $value['point'];
|
||||
}
|
||||
hm_get_template_part('parts/landings/graduation/offer-packet', array(
|
||||
'title' => get_the_title(),
|
||||
'price' => get_field('graduation_offer_price'),'description' => $arr
|
||||
));
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -142,7 +142,7 @@
|
||||
'hierarchical' => false,
|
||||
'menu_position' => 2,
|
||||
'menu_icon' => 'dashicons-tickets-alt',
|
||||
'supports' => array('thumbnail')
|
||||
'supports' => array('title', 'thumbnail')
|
||||
) );
|
||||
|
||||
register_post_type('armanty_feedback', array(
|
||||
@ -203,5 +203,33 @@
|
||||
'supports' => array('title', 'thumbnail')
|
||||
) );
|
||||
|
||||
register_post_type('armanty_graduation', array(
|
||||
'labels' => array(
|
||||
'name' => 'Выпускные пакеты', // Основное название типа записи
|
||||
'singular_name' => 'Выпускной пакет', // отдельное название записи типа Book
|
||||
'add_new' => 'Добавить новый',
|
||||
'add_new_item' => 'Добавить новый пакет',
|
||||
'edit_item' => 'Редактировать пакет',
|
||||
'new_item' => 'Новый пакет',
|
||||
'view_item' => 'Посмотреть пакет',
|
||||
'search_items' => 'Найти пакет',
|
||||
'not_found' => 'Пакетов не найдено',
|
||||
'not_found_in_trash' => 'В корзине пакетных предложений не найдено',
|
||||
'parent_item_colon' => '',
|
||||
'menu_name' => 'Выпускные пакеты'
|
||||
|
||||
),
|
||||
'public' => true,
|
||||
'publicly_queryable' => true,
|
||||
'show_ui' => true,
|
||||
'show_in_menu' => true,
|
||||
'query_var' => true,
|
||||
'has_archive' => 'true', // если нужна страница архива тут указываем её ярлык а не true
|
||||
'capability_type' => 'post',
|
||||
'hierarchical' => false,
|
||||
'menu_position' => 2,
|
||||
'menu_icon' => 'dashicons-tickets-alt',
|
||||
'supports' => array('title')
|
||||
) );
|
||||
}
|
||||
?>
|
||||
Loading…
x
Reference in New Issue
Block a user