[英]PHP link homepage logo to home (premade theme from wordpress.org)
I have researched and looked into the forums already but none seem to be faced with what I'm dealing with. 我已经研究并调查了这些论坛,但是似乎没有人面对我正在处理的问题。
I'm trying to link my company's logo to the home page...but when I inspect the logo element it says it's already linked to the home page but the logo isn't clickable. 我正在尝试将公司的徽标链接到主页...但是当我检查徽标元素时,它说它已经链接到主页,但是徽标不可单击。
I've looked into functions and I can't find "business_kit_the_custom_logo" 我研究过函数,但是找不到“ business_kit_the_custom_logo”
Below is header.php regarding the logo and site branding. 以下是关于徽标和网站品牌的header.php。 link to site is: https://curvetrace.testfixtures.com/ 指向网站的链接是: https : //curvetrace.testfixtures.com/
<div class="bottom-header">
<div class="container">
<div class="site-branding">
<?php echo business_kit_the_custom_logo(); ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p>
<?php
endif; ?>
</div><!-- .site-branding -->
The paragraph with the class "site-description" is overlapping your logo, so when you click the logo you're actually clicking that paragraph. 具有“网站描述”类的段落与您的徽标重叠,因此,当您单击徽标时,您实际上是在单击该段落。 Hover your mouse over the bottom half of your logo and you can see that it is indeed clickable where the paragraph doesn't overlap it. 将鼠标悬停在徽标的下半部分,您会发现在该段落不重叠的地方确实可以单击它。 If you disable the styles for that paragraph your whole logo and the text above that paragraph are clickable. 如果禁用该段落的样式,则可以单击整个徽标和该段落上方的文本。 See image. 见图片。
The sites .site-description paragraph is overlapping the content: 网站.site-description段落与内容重叠:
to fix this, change this style: 要解决此问题,请更改此样式:
.site-description {
padding-left: 31px;
font-size: 22px;
left: 16px;
margin-left: -18px;
position: relative;
top: 0px;
}
to this: (Note that I've used a left padding of 114px
to re-align the P element). 为此:(请注意,我使用了114px
的左填充来重新对齐P元素)。
.site-description {
padding-left: 114px;
font-size: 22px;
}
Now, for mobile responsive, I've changed the padding-left
to 24px
and overridden the default padding using !important
and removed again the positioning styles: 现在,对于移动响应,我将padding-left
更改为24px
并使用!important
覆盖了默认的padding并再次删除了定位样式:
@media screen and (max-width: 551px)
{
.site-description {
padding-left: 24px !important;
float: left;
font-size: 20.5px !important;
font-family: garmond;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.