WP +店面无法使顶部标题的导航和徽标响应

时间:2019-06-30 06:19:24

标签: php css wordpress storefront

您好,在此先感谢, 注意:该站点是NSFW,只有一些成人电子书(浪漫之类的东西,但是电子书封面可能很热)。

我的环境: 我的WP具有woocommerce,店面和书店子主题 我有Snippets插件,在其中添加了所有PHP代码 然后在自定义程序中将CSS添加到自定义CSS中

现在出现问题: 我不知道如何使网站标题,顶部导航栏和徽标+按钮响应。 事实是,我可以使用一些PHP和CSS来获得某些Top标头样式,但是当我进入移动视图时,Top nav var,标头,徽标和菜单会变得疯狂!

我需要解决这个问题,我不知道该怎么做(我用Google搜索了很多,尝试更改值,%,float,inline,block,重要等等),但我找不到正确的提示。 / p>

我{不知道孩子主题或店面本身是否覆盖了我的尝试,也许我必须取消某些功能。

也许就像将所有3个PHP代码段放入一个div和许多spans标签一样简单,但是我无法弄清楚今天的情况。

我将感谢任何建议。

这是我的CSS

/* Logo size for mobile site */
@media screen and (max-width: 768px) {
.site-header .site-branding img {
max-height: none !important;
max-width: none !important;
width: 322px !important;
}
}

/*Remove title from Shop page*/
.woocommerce-products-header
{display: none;}

/*Hide Pages Tite with custom Class added to PHP snippets*/
.hidetitle .entry-header {
display:none;
}

/*Make primary Pages full width*/
body.woocommerce #primary {
width: 100%;
}

/*Align Search Bar and make text pink*/
#woocommerce-product-search-field-0 {
display:inline-block;
width:100%;
color: #fe00a1;
border: solid 1px #fe00a1;
}

/*Edited Cart*/
#site-header-cart{
padding-bottom:20px;
width:15%;
}

/*Changed cart icon bag f\290 to to cart icon f\217 */
.site-header-cart .cart-contents:after,
.storefront-handheld-footer-bar ul li.cart > a:before {
content: “\f217”;
}

/*Align Help link*/
#help{
display:inline-block;
padding-left: 35px;
padding-right: 35px;
}

/*Align Gift card*/
#gift-cardl{
margin-left:80px;
}



/*Add top padding to rectangle*/
#rectangle {
padding:17px;
}


**PHP snippets**

add_action( ‘storefront_header’, ‘header_custom_gift_button’, 40 );
function header_custom_gift_button() { ?>
<span>

<button id=”gift-cardl”>Gift Card</button>
</span>
<?php
}


add_action( ‘storefront_header’, ‘header_custom_help_link’, 40 );
function header_custom_help_link() { ?>
<span style=”width:100%;”>
Help
</span>
<?php
}


add_action( ‘storefront_header’, ‘header_custom_subscribe_button’, 40 );
function header_custom_subscribe_button() { ?>

<button class=”subscribe_newsletter_btn”>Get Daily Book Bargains</button>
</span>
<?php
}

0 个答案:

没有答案