-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
37 lines (33 loc) · 1.31 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
<?php
/*
* Adds CSS stylesheets and Javascript to header element.
*/
function add_theme_scripts() {
wp_enqueue_style( 'normalize', 'https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css' );
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' );
wp_enqueue_style( 'PT Serif', 'http://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic' );
wp_enqueue_style( 'Lato', 'http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic' );
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://code.jquery.com/jquery-2.1.4.min.js' );
wp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.min.js', array( 'jquery' ) );
}
/*
* Makes the home page display posts in the About category.
*/
function set_home_to_about( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( 'category_name', 'about' );
}
}
/*
* Removes the post result limit.
*/
function remove_limits( $limits ) {
return "";
}
add_filter( 'show_admin_bar', '__return_false' );
add_filter( 'post_limits', 'remove_limits' );
add_action( 'pre_get_posts', 'set_home_to_about' );
add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );
?>