correct pinned post and add mail config

This commit is contained in:
argoexpert press
2024-04-12 21:14:24 +03:00
parent 6ab7d934a9
commit ce406b9c32
3 changed files with 90 additions and 29 deletions

View File

@@ -1,14 +1,6 @@
<?php
// Получаем объект закрепленного поста из ACF поля 'pinned_post'
//$pinned_post = get_field('pinned_post', 'options');
$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) :