If you want to add custom css on all the pages of a WordPress website except the homepage, you can do it via something like this. Put this code in the header.php of your theme file In place of .yourcssclass you need to use your own css classes. This setting will work if you have a page set as front page from the reading settings. In order to use custom css in some themes where homepage is not controlled by a page but from widget or theme settings, you can...
How To Create Your Own Shortcode For Clear Property in WordPress
When writing HTML code or working with WordPress pages, we often come across a situation where we want to clear areas and put next div or element on next line instead of floating with previous block. You can write quick HTML to fix such issues. But in case of repeated situation, you may create this handy code using WordPress shortcode feature. Add the following lines in your theme's funtions.php and use the [clear] shortcode you clear the areas on left and right in HTML. Step 1: function ad_clear_shortcode( $atts , $content = null ) { // Code return ''; } add_shortcode( 'clear',...
How to Write Custom CSS Specifically for Certain Page Templates in WordPress
If you want to add custom css for a specific page template, you can use is page template function in the header in if condition and write the corresponding css as the sample below.