php - WP + 店面无法使顶部标题导航和徽标响应
问题描述
您好,在此先感谢您,注意:该网站是 NSFW,只是一些成人电子书(浪漫之类的东西,但电子书的封面可能很热)。
我的环境: 我有带有 woocommerce、店面 + 书店子主题的 WP 我有 Snippets 插件,我在其中添加了所有 PHP 代码并将 CSS 添加到定制器中的自定义 CSS
现在的问题是: 我不知道如何使网站标题、顶部导航栏和徽标+按钮响应。事实是,我可以使用一些 PHP 和 CSS 获得一些顶部标题样式,但是当我进入移动视图时,顶部导航 var、标题、徽标和菜单变得疯狂!
我需要解决这个问题,我不知道该尝试什么(我搜索了很多,尝试更改值、%、浮动、内联、块、重要等),但我无法得到正确的提示。
我不知道子主题或店面本身是否覆盖了我的尝试,也许我必须取消某些功能。
也许就像将所有 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
}
解决方案
推荐阅读
- php - Laravel `php artisan serve` 抛出没有意义的错误
- python - 将数据框解析为 Pandas 分析库时出现 TypeError
- google-sheets - 谷歌表复杂查询?
- coq - Coq infotheo %B is_true
- javascript - 降低功能的认知复杂性
- mysql - MySQL - 覆盖现有行
- python - 使用带有“!”的 mkdir 命令时出现错误 - Python
- c++ - 如何在不导致分段错误的情况下删除堆上的对象
- powershell - 为什么 PowerShell' 在尝试解析主路径时会忽略 `ErrorAction` 参数?
- automation - Ansible uri 模块授权无法按预期工作