correct pinned post and add mail config
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
<?php
|
||||
|
||||
$sticky_posts = get_option('sticky_posts');
|
||||
|
||||
// Получаем последний идентификатор прилепленного поста
|
||||
$last_sticky_post_id = end($sticky_posts);
|
||||
|
||||
// Получаем объект поста по его идентификатору
|
||||
$pinned_post = get_post($last_sticky_post_id);
|
||||
$pinned_post = last_sticky_post();
|
||||
|
||||
if ($pinned_post):
|
||||
$mainpost_id = $pinned_post->ID;
|
||||
|
||||
Reference in New Issue
Block a user