How to hide WordPress theme date CSS style? div hidden css style tutorial

how to hideWordPressTheme date CSS style?

DIV hidden CSS style tutorial

Chen WeiliangRecently, the website template has been improved and optimized, and this is also done to take into accountSEOuser experience.

will get new mediaPeople asked:What if we want to hide a certain icon, date of a WordPress theme?

The answer is to hide the styles with CSS:

.r-hide {display:none;}

CSS hidden styles can achieve:

  • 1) Hidden text
  • 2) Hide hyperlinks (black links)
  • 3) Hide statistical code
  • 4) Hide icon

First, we need to find CSS selectors.

What are CSS selectors?

The definition of each CSS style consists of 2 parts:

选择器{样式}
  • The part before {} is the "selector".
  • The "selector" indicates the "style" of the {} object.
  • Comments on which element of the page does this "style" work?

How to find CSS selectors?

Code example 1

The following is an example of a GIF animation. After finding the CSS selector through the browser, the date is hidden▼

Hide date after CSS selector is found via browser

Get CSS selectors time.the-date After that, add the following CSS code to the style.css file of the WP theme:

time.the-date {
 display: none;
}

Code example 2

Here's how to select and style an element with class="r-hide":

.r-hide {display:none;}

If the WP theme has options, you can add the above CSS code to theWP Theme Options → Customize Style → Customizestyle code box.

  • Use CSS stylesdisplay: none;  hide the specified content,
  • Invisible through the browser, hidden content does not take up space,
  • Usually used to hide JS effects, hide icons of statistical codes, etc.

Extended reading:

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared How to Hide WordPress Theme Date CSS Styles? div hidden css style tutorial" to help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-608.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top