我尝试编写一个过滤器,将页面标题从h5更改为h1。下面是我尝试更改的父主题函数的摘录:
function constico_site_breadcrumbs() {
$breadcrumbs_settings = apply_filters( 'constico_breadcrumbs_settings', array(
'wrapper_format' => '<div class="container"><div class="row">%1$s<div class="breadcrumbs__items">%2$s</div></div></div>',
'page_title_format' => '<div class="breadcrumbs__title"><h5 class="page-title">%s</h5></div>',// trying to change this into h1
'separator' => '/',
'show_title' => $breadcrumbs_page_title,
'path_type' => $breadcrumbs_path_type,
我尝试将整个函数复制到带有更改的过滤器挂钩中,但它产生了错误。function tt_seopagetitle() { // function with changes } add_filter('constico_breadcrumbs_settings','tt_seopagetitle');
指导将非常感谢!
1条答案
按热度按时间2admgd591#
您可以像这样只覆盖
page_title_format