update more load mainpage
This commit is contained in:
@@ -18,6 +18,6 @@
|
||||
?>
|
||||
<?php get_template_part('partials/post-list', null, ['large_first_image' => false, 'query' => $query]); ?>
|
||||
</div>
|
||||
<button class="articles-preview__show-next">Загрузить еще</button>
|
||||
<button class="articles-preview__show-next">Еще новости</button>
|
||||
</div>
|
||||
<?php get_footer(); ?>
|
||||
|
||||
5
frontend/dist/assets/main.css
vendored
5
frontend/dist/assets/main.css
vendored
@@ -3249,6 +3249,7 @@ a.pagination__item:hover {
|
||||
}
|
||||
|
||||
.articles-preview__show-next {
|
||||
color: var(--secondary);
|
||||
padding: 1.8rem 0 1.7rem;
|
||||
grid-column: span 2;
|
||||
width: 100%;
|
||||
@@ -3256,11 +3257,9 @@ a.pagination__item:hover {
|
||||
border-top: 0.1rem solid var(--gray);
|
||||
margin-top: -1px;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
|
||||
-webkit-transition: 0.3s;
|
||||
|
||||
transition: 0.3s;
|
||||
font-size: 1.3rem;
|
||||
font-size: 1.6rem;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
|
||||
@@ -1 +1 @@
|
||||
<button class="articles-preview__show-next">Загрузить еще</button>
|
||||
<button class="articles-preview__show-next">Еще новости</button>
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
}
|
||||
|
||||
.articles-preview__show-next {
|
||||
color: var(--secondary);
|
||||
padding: 1.8rem 0 1.7rem;
|
||||
grid-column: span 2;
|
||||
width: 100%;
|
||||
@@ -96,9 +97,8 @@
|
||||
border-top: 0.1rem solid var(--gray);
|
||||
margin-top: -1px;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
|
||||
transition: 0.3s;
|
||||
font-size: 1.3rem;
|
||||
font-size: 1.6rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@@ -600,3 +600,46 @@ function custom_meta_tags() {
|
||||
echo $og_tags;
|
||||
}
|
||||
|
||||
|
||||
add_action('wpcf7_before_send_mail', 'my_custom_contact_form_handler', 10, 3);
|
||||
function my_custom_contact_form_handler($contact_form, $abort, $submission) {
|
||||
|
||||
|
||||
|
||||
// Получаем ID формы
|
||||
$form_id = $contact_form->id();
|
||||
|
||||
|
||||
if ( $form_id == '0ddb83c' ) {
|
||||
|
||||
// Получаем данные формы
|
||||
$submission = WPCF7_Submission::get_instance();
|
||||
|
||||
if ($submission) {
|
||||
|
||||
$posted_data = $submission->get_posted_data();
|
||||
|
||||
// Подключаемся к базе данных WordPress
|
||||
global $wpdb;
|
||||
|
||||
// Определяем таблицу в базе данных WordPress в зависимости от ID формы
|
||||
$table_name = $wpdb->prefix . 'subusers';
|
||||
|
||||
$wpdb->insert(
|
||||
$table_name,
|
||||
array(
|
||||
'mail' => $posted_data['your-email'],
|
||||
'status' => 0,
|
||||
'date' => current_time('mysql')
|
||||
),
|
||||
array(
|
||||
'%s', // Формат для строкового поля
|
||||
'%d', // Формат для цифрового поля
|
||||
'%s' // Формат для поля с датой и временем
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ jQuery(function($){
|
||||
},
|
||||
success : function( data ){
|
||||
if( data ) {
|
||||
button.text('Загрузить ещё');
|
||||
button.text('Еще новости');
|
||||
$('.articles-preview').append(data);
|
||||
my_load_more_params.current_page++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user