Editing wordpress theme without edit the origin theme file

Editing wordpress theme without edit the origin theme file. There are many way to castumize wordpress theme. One of them is using child themes ( http://codex.wordpress.org/Child_Themes ). As wordpress said, child themes are the recommended way of making modifications to a theme if you want your modifications are still there. To start editing please follow Codex wordpress on http://codex.wordpress.org/Child_Themes , or follow this steps :
*this example using fastfood theme as original theme.

  • Create directory in themes directory, for example fastfood-child
  • Create style.css and import the fastfood theme style, look at the code below
/*
Theme Name:     fastfood Child
Theme URI:      http: //mendoan.us/
Description:    Child theme for the fastfood theme 
Author:         securesh
Author URI:     http: //kencur.net/about/
Template:       fastfood
Version:        0.1.0
*/

@import url("../fastfood/style.css");

/*
body {
	background: #C0C0C0;
}
*/
  • To support RTL languages, add rtl.css file to your child theme
/*
Theme Name:     fastfood Child
Template:       fastfood
*/

@import url("../fastfood/rtl.css");
[/sourcecode]


For example if you want add a meta tag from search engine verification and add the favicon or icon for your web : create functions.php in child theme directory, and paste this code

<?php
function favicon_link() {
?>
<link rel="shortcut icon" type="image/x-icon" href="your image" />
<?php
}
add_action('wp_head', 'favicon_link');
function seoverify() {
?>
<your meta code>
<meta name="msvalidate.01" content="your validation" />
<?php
}
add_action('wp_head', 'seoverify');
?>

To use the child theme just activate your child theme from wp-admin.
You are don :)

Published by

7 thoughts on “Editing wordpress theme without edit the origin theme file”

  1. Amri berkata:

    Simpen dulu cur, dadi dulu sebenenya pengen bleajar buat/edit themes wordpress. :D

  2. lanionk berkata:

    mantap lek asep :D

  3. falal berkata:

    gak mudeng aku cur,yang penting komeng :gy:

  4. badrun berkata:

    nice info guys :)

  5. Asep Sudiyono berkata:

    yoi trims kunjungannya tukang bisnis :)

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *