在wordpress中将标题添加到标语行

问题描述 投票:0回答:1

我尝试将此添加到儿童主题functions.php。我使用徽标网址的代码作为模型。我需要标语链接到网址。

add_action('parse_request', 'my_custom_url_handler');
function my_custom_url_handler() {
   if  ( !in_array( '__navbar' , $wp_current_filter ) ) 
     <span class="header-tagline  <?php czr_fn_echo( 'element_class' ) ?>" 
        <?php czr_fn_echo( 'element_attributes' ) ?>>
        <a  href="<?php echo esc_url( home_url( '/' ) )
          <?php echo get_bloginfo( 'description', 'display' ) ?>
        </a>
     </span>
   <?php endif; ?>
}
php wordpress
1个回答
0
投票
add_filter('option_blogdescription', 'custom_option_description', 10, 1);
function custom_option_description($value) {
    return 'custom description';
}

子函数文件中的简单函数

© www.soinside.com 2019 - 2024. All rights reserved.