Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress-显示类别列表中的所有按钮_Php_Wordpress_Wp List Categories - Fatal编程技术网

Php Wordpress-显示类别列表中的所有按钮

Php Wordpress-显示类别列表中的所有按钮,php,wordpress,wp-list-categories,Php,Wordpress,Wp List Categories,我有以下页面:我正在使用此代码在顶部的黄色栏中列出类别: <div class="container-fluid cat-list-container-fluid"> <div class="container cat-list-container"> <ul> <?php wp_list_categories( array( 'orderby'

我有以下页面:我正在使用此代码在顶部的黄色栏中列出类别:

<div class="container-fluid cat-list-container-fluid">
    <div class="container cat-list-container">

            <ul>
                <?php wp_list_categories( array(
                    'orderby'            => 'id',
                    'show_count'         => false,
                    'title_li' => false
                ) ); ?>
            </ul>

    </div>
</div>
我想在列表的开头有一个ALL按钮,它将再次显示所有类别


是否有一个数组选项可以添加到其中并将其设置为True?还是还有更多?任何帮助都会非常感激:

好的,这是我使用数组中的show\u option\u all参数简单地解决的,如下所示:

<div class="container-fluid cat-list-container-fluid">
    <div class="container cat-list-container">

            <ul>
                <?php wp_list_categories( array(
                    'orderby'            => 'id',
                    'show_count'         => false,
                    'show_option_all'     => 'Show All',
                    'title_li' => false
                ) ); ?>
            </ul>

    </div>
</div>

这在我的列表开始处创建了一个名为“全部显示”的按钮。

是否只有一种帖子类型?你不能再添加一个链接到>所有whoa所有类别吗?这是什么意思?现在还不清楚你要的是什么。抱歉,这是应该展示的:我现在改了…我可以做Alex,但我想知道是否有更好、更正确的方法来做这件事,因为代码正在生成菜单。。。因此,在开始时添加一个新的列表项似乎有点笨拙。