Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Child theme notes
  • Loading branch information
Dzikri Aziz committed Feb 7, 2012
1 parent d6dbf55 commit 88bbfd5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 1 deletion.
32 changes: 32 additions & 0 deletions README.md
Expand Up @@ -11,3 +11,35 @@ either create a child theme and add the css fixes for IE, or simply don't use it
* The whole WordPress and web dev community
* [Libertine Open Fonts Projekt] (http://www.linuxlibertine.org/)
* DevPress' [Dotos] (http://devpress.com/themes/dotos/) theme for the background image

### Notes
If you decided to create a child theme, you need to enqueue your child theme's stylesheet:
```php
function child_styles() {
wp_enqueue_style( 'child-theme', get_bloginfo( 'stylesheet_url' ) );
}
add_action( 'wp_enqueue_scripts', 'child_styles', 11 );
````

If you don't want the default stylesheet to be used, you need to dequeue it:
```php
function child_styles() {
wp_dequeue_style( 'polos' );
wp_enqueue_style( 'child-theme', get_bloginfo( 'stylesheet_url' ) );
}
add_action( 'wp_enqueue_scripts', 'child_styles', 11 );
```

To remove default actions, you need to call `remove_action()` from `init` or `after_setup_theme` hooks:
```php
function child_setup() {
remove_action( 'kct_after_branding', 'get_search_form' );
}
add_action( 'after_setup_theme', 'child_setup', 100 );
```

This theme doesn't support long site name and description by default. Also, the menu location (`main`) on
the header should only be used for menu with 3 or 4 parent menu items (sub-menus are not limited).
However, you can always create a child theme to support these:
1. If you need more parent menu items, override the main menu styles (mainly the absolute positioning)
2. If you have long site name and/or description, remove the search form on the header (see example above)
35 changes: 34 additions & 1 deletion readme.txt
@@ -1,4 +1,4 @@
= Polos WordPress Theme
=== Polos WordPress Theme ===

== About ==
Polos is a minimalist theme I needed for my [blog] (http://kucrut.org).
Expand All @@ -11,3 +11,36 @@ either create a child theme and add the css fixes for IE, or simply don't use it
* The whole WordPress and web dev community
* [Libertine Open Fonts Projekt] (http://www.linuxlibertine.org/)
* DevPress' [Dotos] (http://devpress.com/themes/dotos/) theme for the background image


== Notes ==
If you decided to create a child theme, you need to enqueue your child theme's stylesheet:
`
function child_styles() {
wp_enqueue_style( 'child-theme', get_bloginfo( 'stylesheet_url' ) );
}
add_action( 'wp_enqueue_scripts', 'child_styles', 11 );
`

If you don't want the default stylesheet to be used, you need to dequeue it:
`
function child_styles() {
wp_dequeue_style( 'polos' );
wp_enqueue_style( 'child-theme', get_bloginfo( 'stylesheet_url' ) );
}
add_action( 'wp_enqueue_scripts', 'child_styles', 11 );
`

To remove default actions, you need to call remove_action() from `init` or `after_setup_theme` hooks:
`
function child_setup() {
remove_action( 'kct_after_branding', 'get_search_form' );
}
add_action( 'after_setup_theme', 'child_setup', 100 );
`

This theme doesn't support long site name and description by default. Also, the menu location (`main`) on
the header should only be used for menu with 3 or 4 parent menu items (sub-menus are not limited).
However, you can always create a child theme to support these:
* If you need more parent menu items, override the main menu styles (mainly the absolute positioning)
* If you have long site name and/or description, remove the search form on the header (see example above)

0 comments on commit 88bbfd5

Please sign in to comment.