csscss

Sometimes, it is necessary to add some custom CSS to your website to achieve functionality that is not available in your current WordPress theme.

Method 1: Use the Simple CSS plug-in

simple css add code

The easiest way is to install Simple CSS. With this plugin, you can enter your CSS code into one of the editors provided on the plugin without having to create any files or perform any other complicated operations.

Another benefit of this plugin is that you can find CSS boxes on every page. Allows you to add CSS that applies only to that page, which may also be useful.

Installation method: Just go to Plugins>Add New in the Dashboard and search for Simple CSS, then download and install it.

Method 2: Use the Additional CSS that comes with WordPress to add

Additional CSS added code

Starting with WordPress version 4.7, WordPress added a way to add CSS to the customizer in your website, which can be found in Appearance > Customize > Additional CSS found in.

It should be noted that the CSS added in this area is based on the currently used theme, so if you switch themes, you will lose the CSS.

It doesn’t have a single custom box for individual page-specific CSS.

The advantage is that there is no need to download plug-ins and it is very lightweight.

Method 3: Use Child Theme (child theme)

Of course, if you are already using a child theme, you can use the style.css file.

If you are not using a child theme and are just adding CSS to your website, it is best to use one of the first two methods above.

Summary of my commonly used CSS codes


How to display “last updated” or last updated date in post CSS code :

.posted-on .updated {
display: inline-block;
}
.posted-on .published {
display: none;
}

By

Leave a Reply

Your email address will not be published. Required fields are marked *