-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathfunctions.php
More file actions
40 lines (30 loc) · 1.27 KB
/
functions.php
File metadata and controls
40 lines (30 loc) · 1.27 KB
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
<?php /* Functions for mah slideshow */
function slideshow_assets() {
// Scripts
wp_enqueue_script( 'modernizer', get_stylesheet_directory_uri() . '/js/modernizr.js' );
wp_register_script( 'bacond', get_stylesheet_directory_uri() . '/js/jquery.ba-cond.min.js', array('jquery'));
wp_register_script( 'slitslider', get_stylesheet_directory_uri() . '/js/jquery.slitslider.js', array('jquery', 'bacond'));
wp_enqueue_script( 'fsscustom', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery', 'bacond', 'slitslider'));
// Styles
wp_enqueue_style( 'customcss', get_stylesheet_uri() );
}
add_action('wp_enqueue_scripts', 'slideshow_assets');
function twentytwelve_setup() {
// This theme supports a variety of post formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status', 'video' ) );
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 1280, 768, true );
}
add_action( 'after_setup_theme', 'twentytwelve_setup' );
function load_slides( $query ) {
if ( is_admin() || ! $query->is_main_query() ) {
$query->set( 'order', 'ASC' );
return;
}
if ( is_home() ) {
$query->set( 'posts_per_page', 60 );
$query->set( 'order', 'ASC' );
return;
}
}
add_action( 'pre_get_posts', 'load_slides', 1 );