Php Wordpress Jetpack特色内容标签ID
我希望能够为Jetpack特色内容模块调用用户选择的标签ID,但我找不到保存该值的函数或对象 我基本上是在用以下参数从WP_查询中筛选特色帖子:Php Wordpress Jetpack特色内容标签ID,php,wordpress,jetpack,Php,Wordpress,Jetpack,我希望能够为Jetpack特色内容模块调用用户选择的标签ID,但我找不到保存该值的函数或对象 我基本上是在用以下参数从WP_查询中筛选特色帖子: $args = array( 'ignore_sticky_posts' => 1, 'posts_per_page' => $recent_posts_count, 'tag__not_in' => array( [HERE
$args = array(
'ignore_sticky_posts' => 1,
'posts_per_page' => $recent_posts_count,
'tag__not_in' => array(
[HERE IS WHERE I WANT PHP TO TELL ME THE TAG ID]
),
'post_type' => array(
'post'
)
);
检查这个
<?php
global $post;
$tags = get_tags($post->ID);
$tagids = array();
foreach($tags as $tag) $tagids[] = $tag->term_id;
$args = array(
'ignore_sticky_posts' => 1,
'posts_per_page' => $recent_posts_count,
'tag__not_in' => $tagids,
'post_type' => array(
'post'
)
);
?>
谢谢我知道这已经很晚了,但我在寻找同样的东西时找到了这篇文章,甚至在WordPress支持论坛上也找到了,但最终还是找到了:
$featured_options = get_option( 'featured-content' );
$featured_name = $featured_options[ 'tag-name' ];
该程序在何处访问Jetpack以查找特征标签ID?