Developer Snippet Diary

style.css wordpress

The style.css is a stylesheet (CSS) file required for every WordPress theme. It controls the presentation (visual design and layout) of the website pages.
1. Make style.css in themes/yourtheme/style.css
2. Make themes/yourtheme/function.php

/*
Theme Name: Twenty Twenty
Theme URI: https://wordpress.org/themes/twentytwenty/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: cool thene
Version: 1.3
Requires at least: 5.0
Tested up to: 5.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwenty
*/

 

Theme URI: The URL of a public web page where users can find more information about the theme.
Author (*): The name of the individual or organization who developed the theme. Using the Theme Author’s wordpress.org username is recommended.
Version (*): The version of the theme, written in X.X or X.X.X format.
License (*): The license of the theme.
License URI (*): The URL of the theme license.
Text Domain (*): The string used for textdomain for translation.

CHILD THEME:

A child theme allows you to change small aspects of your site’s appearance yet still preserve your theme’s look and functionality. A child theme inherits the look and feel of the parent theme and all of its functions, but can be used to make modifications to any part of the theme.

  • allow parent themes to be updated without destroying your modifications;

To create child them

1.Create a child theme folder
Create a new folder in your themes directory, located at wp-content/themes. Give a child theme the same name as the parent, but with -child appended to the end. For example,  twentyfifteen-child.

2. Create a stylesheet: style.css

/*
Theme Name:   Twenty Fifteen Child
Theme URI:    http://example.com/twenty-fifteen-child/
Description:  Twenty Fifteen Child Theme
Template:     twentyfifteen
Version:      1.0.0
Text Domain:  twentyfifteenchild
*/

>> ACTIVATE THEME

 

Posted by: R GONDAL
Email: rizikmw@gmail.com