我试图创建一个页面计数器,排除某些ID页面,但代码不起作用。
我正在使用此代码。我怎样才能修复它?谢谢
<?php
$count_pages = wp_count_posts(\'page\');
echo "$count_pages->publish";
$args = array(
\'post__not_in\' => array(10010),
);
query_posts($args);
?>
" array(10010), ="" ); ="" query_posts($args); ?>"="">
我试图创建一个页面计数器,排除某些ID页面,但代码不起作用。
我正在使用此代码。我怎样才能修复它?谢谢
<?php
$count_pages = wp_count_posts(\'page\');
echo "$count_pages->publish";
$args = array(
\'post__not_in\' => array(10010),
);
query_posts($args);
?>
这应该可以帮助您排除via ID:
//replace the 3,8 with your page ids
<?php $args=array(
\'post__not_in\' => array(3,8),
\'post_type\' => \'page\',
\'post_status\' => \'publish\',
);
query_posts($args); ?>
如果要通过页面标题排除,可以执行此操作<?php $exclude1 = get_page_by_title(\'Sample Page Title\'); ?>
<?php $exclude2 = get_page_by_title(\'Sample Page Title 2\'); ?>
<?php $args = array(
\'post_type\' => \'page\',
\'order\' => \'ASC\',
\'post__not_in\' => array($exclude1->ID,$exclude2->ID)
);
query_posts($args); ?>
我有一个网站出现了问题(几个月来一直没有被修改过,所以没有做任何修改来破坏它)登录时,登录页面未设置样式,位于左上角。我可以正常登录,但当我尝试访问仪表板或任何/wp admin/。。。我得到404页。(网站加载公共内容罚款)我已经尽我所能搜索并尝试了一切。禁用所有插件,默认为menew。htaccessphpmyadmin重命名站点地址以前有没有人经历过这种情况,有没有其他想法?