首页 > 解决方案 > 销位置 - 滑块销位置问题

问题描述

我使用 PHP 和 WordPress 创建了一个包含三个帖子的滑块。现在,我想用现有帖子之一替换最近的帖子。我该怎么做?

<?php

for ($cnt2 = 1; $cnt2 <= 2; $cnt2++) {
    $pin_to = get_post_meta($latest_post_array [$cnt2] ["id"], 'pin_to', true);
    $pin_at = get_post_meta($latest_post_array [$cnt2] ["id"], 'pin_slider_no', true);
    if ($pin_at == "s0" || $pin_at == "") {
        $popupvideoads2 = "N";
    } else {
        if ($pin_to > $today) {
            $popupvideoads2 = "Y";
        }
    }
}

标签: phpwordpress

解决方案


推荐阅读