【问题标题】:woo_breadcrumbs function and custom-post-typewoo_breadcrumbs 函数和自定义帖子类型
【发布时间】:2012-09-17 16:21:46
【问题描述】:

我正在使用 woo_breadcrumbs 函数,需要插入当前自定义帖子类型的名称。目前它正在显示主页+类别,Home -> Category。有没有一种简单的方法可以调用当前 Custom-Post-Type 的名称并将其插入 home 和 category 之间?函数文件夹中admin-fuction.php 文件中的函数。

谢谢!!

【问题讨论】:

    标签: wordpress custom-post-type breadcrumbs woothemes


    【解决方案1】:

    到目前为止,我发现了以下内容,希望对您有所帮助。这是专门针对单一分类法编写的:

    add_filter( 'woo_breadcrumbs_args', 'woo_video_filter_breadcrumbs_args', 10 );
    
    if ( ! function_exists( 'woo_video_filter_breadcrumbs_args' ) ) {
        function woo_video_filter_breadcrumbs_args( $args ) {
            $args['singular_video_taxonomy'] = 'videos';
            return $args;
        }
    }
    

    【讨论】:

      猜你喜欢
      • 2022-07-20
      • 2013-05-12
      • 2013-08-03
      • 1970-01-01
      • 1970-01-01
      • 2017-02-13
      • 2013-03-17
      • 1970-01-01
      • 2017-01-03
      相关资源
      最近更新 更多