" /> -6ren">
gpt4 book ai didi

php - 如何在 wordpress 中更改链接的 Logo ?

转载 作者:太空宇宙 更新时间:2023-11-04 08:29:17 25 4
gpt4 key购买 nike

我想更改 wordpress Logo 标题中的链接,但我不知道如何更改它,我尝试更改 header.php ,不幸的是,那不起作用

header.php

<?php
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="body-content-wrapper">

<header id="header-main-fixed">

<div id="header-content-wrapper">

<div id="header-top">
<div id="weglot_here"></div>
<? //php fart_display_social_sites(); ?>
</div>

<div class="clear"></div>

<div id="header-logo">
<?php fart_show_website_logo_image_and_title(); ?>
</div><!-- #header-logo -->

<nav id="navmain">

<?php wp_nav_menu( array( 'theme_location' => 'primary',
'fallback_cb' => 'wp_page_menu',

) ); ?>
</nav><!-- #navmain -->



<div class="clear">

</div><!-- .clear -->

</div><!-- #header-content-wrapper -->

</header><!-- #header-main-fixed -->

<div id="header-spacer">
&nbsp;
</div><!-- #header-spacer -->

谁能帮帮我?

最佳答案

functions.php 中找到 fart_show_website_logo_image_and_title() 函数并将下面一行中的 href 属性更改为您想要的:

    echo '<a href="' . esc_url( home_url('/') ) . '" title="' . esc_attr( get_bloginfo('name') ) . '">';

关于php - 如何在 wordpress 中更改链接的 Logo ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44904041/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com