-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfunctions.php
53 lines (40 loc) · 1.29 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
<?php
function show_tag_list ($id, $separator, $before) {
$tags = wp_get_post_tags($id);
if (!empty($tags)) {
$tags_html = array();
foreach ($tags as $tag) {
$tags_html[] = "<a href='" . site_url() . "/tag/{$tag->slug}'>{$tag->name}</a>";
}
echo $before . join($separator, $tags_html);
}
}
function meta_description() {
if (is_single()) {
the_excerpt();
}
else {
echo 'A Minimal WordPress theme';
}
}
register_nav_menu('primary', 'Nav Bar');
/* Filters */
function my_embed_oembed_html($html, $url, $attr, $post_id) {
return '<div class="video">' . $html . '</div>';
}
add_filter('embed_oembed_html', 'my_embed_oembed_html', 99, 4);
function modify_read_more_link() {
return '<a class="more-link" href="' . get_permalink() . '"><span>Continue reading</span></a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link' );
/* Stylesheets */
wp_enqueue_style( 'mobile', get_stylesheet_directory_uri() . '/mobile.css' );
wp_enqueue_style( 'print', get_stylesheet_directory_uri() . '/print.css' );
/* Theme Support*/
$headerargs = array(
'width' => 128,
'height' => 128,
'default-image' => 'http://placehold.it/128x128',
);
add_theme_support( 'custom-header', $headerargs );
?>