Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1122846
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 months ago.
Improve this questionI own and run a gaming website. The games are listed in a WooCommerce catalogue (this was set up prior to my acquisition of it).
Whenever the games catalogue page is loaded, the title "Shop" is shown at the top.
I want to remove the title altogether as it isn't actually a shop.
The page can't be edited (as it is generated via the WooCommerce plugin) and there is no option in the WooCommerce settings to either remove or even change it to something else.
I've spent perhaps two hours trying to remove the word "Shop" from the page using a variety of PHP and CSS methods I have read about online for people with similar problem but with no luck.
How can it be done?
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 3 months ago.
Improve this questionI own and run a gaming website. The games are listed in a WooCommerce catalogue (this was set up prior to my acquisition of it).
Whenever the games catalogue page is loaded, the title "Shop" is shown at the top.
I want to remove the title altogether as it isn't actually a shop.
The page can't be edited (as it is generated via the WooCommerce plugin) and there is no option in the WooCommerce settings to either remove or even change it to something else.
I've spent perhaps two hours trying to remove the word "Shop" from the page using a variety of PHP and CSS methods I have read about online for people with similar problem but with no luck.
How can it be done?
Share Improve this question edited Sep 28, 2024 at 23:07 Mus asked Sep 28, 2024 at 23:01 MusMus 1195 bronze badges 2 |1 Answer
Reset to default 1CSS METHOD
To hide with CSS this should do the trick for you. Add the following to the theme's or child theme's style.css, or to the Customizer's CSS section:
body.post-type-archive-product .bs-card-box.page-entry-title {
display: none;
}
What we're doing here is targeting the product archive template file that WooCommerce uses to dynamically create that page. By doing this we avoid hiding the title on other pages. The specification comes from body.post-s-type-archive-product
.
Then we locate the container on the page that has the title, which is .bs-card-box.page-entry-title
and we set the display to display: none;
.
That should take care of it for you.
THEME/TEMPLATE METHOD
Now, the way to do it by editing it in WooCommerce is as follows.
You want to locate, in the parent theme a file called archive-product.php
. It'll probably be located in wp-content/themes/your-theme-directory/woocommerce/archive-product.php
.
If you copy that over to your child theme and match the path so it's:
wp-content/themes/your-child-theme-directory/woocommerce/archive-product.php
Then find where that mark-up and PHP is, something similar to this:
<div class="bs-card-box page-entry-title">
<h1 class="entry-title title mb-0">SHOP</h1>
</div>
...then just comment out that code in your copy that you've put into your child theme.
Like this:
<!--<div class="bs-card-box page-entry-title">
<h1 class="entry-title title mb-0">SHOP</h1>
</div> -->
Keep in mind that I'm kinda just guessing on what this will look like and guessing the location of this file, it'll most likely be different. However, the CSS method should be all that you need.
本文标签: phpIs it possible to remove the quotShopquot title from the WooCommerce catalogue
版权声明:本文标题:php - Is it possible to remove the "Shop" title from the WooCommerce catalogue? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736285914a1927558.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
archive_products.php
and then place the edited version in your child theme which will override the WooCommerce template. You also can do it with CSS, but I'd need to see the page to show you the rule. – Tony Djukic Commented Sep 30, 2024 at 20:25archive.php
. The page in question is cloudgamingcatalogue.com/cloud-gaming-catalogue. Thank you. – Mus Commented Oct 2, 2024 at 12:16