我正在尝试查询我的自定义帖子类型。我可以使用以下代码显示这两个选项:
\'post_type\'=> array(\'map\',\'item\')
请帮忙!
我正在尝试查询我的自定义帖子类型。我可以使用以下代码显示这两个选项:
\'post_type\'=> array(\'map\',\'item\')
请帮忙!
因为4.0版可用\'type\'
option for \'orderby\'
argument 在里面WP_Query
.
此外,由于more powerful ORDER BY in WordPress 4.0 您可以控制帖子类型的帖子排序方式。
示例(未测试):
$q = new WP_Query(array(
\'post_type\' => array(\'map\',\'item\'),
\'orderby\' => array(
\'type\' => \'DESC\',
\'title\' => \'ASC\'
)
));
我有这个functions.php 文件,我无法将jQuery加载到页脚中。这个includes 不过,文件在页脚中加载很好。我还需要做什么?function starter_scripts() { wp_enqueue_style( \'starter-style\', get_stylesheet_uri() ); wp_enqueue_script( \'jquery\', \'\', \'\', \'\', true ); wp_