-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunctions.php
65 lines (53 loc) · 1.97 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
//
// Custom Child Theme Functions for ShiftSpace.org
//
// I've included a "commented out" sample function below that'll add a home link to your menu
// More ideas can be found on "A Guide To Customizing The Thematic Theme Framework"
// http://themeshaper.com/thematic-for-wordpress/guide-customizing-thematic-theme-framework/
function add_blueprint() {
// Include main screen styles css
$content = "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/screen.css';
$content .= "\" media=\"screen, projection\" />";
$content .= "\n";
// Include print css
$content .= "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/print.css';
$content .= "\" media=\"print\" />";
$content .= "\n";
// Include IE-specific CSS fix
$content .= "\t";
$content .= "<!--[if lt IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_directory');
$content .= '/css/blueprint/ie.css';
$content .= "\" /><![endif]-->";
$content .= "\n";
// Include the original style.cc again so it overides the blueprint code
// ideally we would've also found a way to remove the first reference to styles.css, but I couldn't find how
$content .= "\t";
$content .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"";
$content .= get_bloginfo('stylesheet_url');
$content .= "'\" media=\"screen, projection\" />";
$content .= "\n";
// Echo the whole thing
echo $content;
}
add_action ('wp_head', 'add_blueprint');
// Adds a home link to your menu
// http://codex.wordpress.org/Template_Tags/wp_page_menu
function childtheme_menu_args($args) {
$args = array(
'show_home' => 'Home',
'sort_column' => 'menu_order',
'menu_class' => 'menu',
'echo' => true
);
return $args;
}
add_filter('wp_page_menu_args','childtheme_menu_args');
?>