[英]Adding Url to Tagline in wordpress
我嘗試將其添加到子主題functions.php
。 我將徽標網址的代碼用作模型。 我需要標語鏈接到URL。
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; ?>
}
add_filter('option_blogdescription', 'custom_option_description', 10, 1);
function custom_option_description($value) {
return 'custom description';
}
子功能文件中的簡單功能
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.