'Sidebar', 'id' => 'sidebar' ) ); add_theme_support( 'post-thumbnails' ); /* Adds RSS feed links to for posts and comments. */ add_theme_support( 'automatic-feed-links' ); /* This theme uses wp_nav_menu() in one location. */ register_nav_menu( 'head', 'Navigation menu' ); /* This theme supports custom background color and image. */ add_theme_support( 'custom-background', array( 'default-image' => get_template_directory_uri() . '/images/main-bg.jpg' ) ); /* This theme supports custom header image. */ add_theme_support( 'custom-header', array( 'default-image' => get_template_directory_uri() . '/images/default-image.jpg', 'height' => 343, 'width' => 1200 ) ); add_editor_style(); show_admin_bar( true ); } function camp_add_scripts() { /* Load script */ wp_enqueue_script( 'camp-script', get_template_directory_uri() . '/js/script.js', array( 'jquery' ) ); /* Load main stylesheet */ wp_enqueue_style( 'camp-style', get_stylesheet_uri() );?>
>
'; /* refresh page */ } } /* Cut excerpt for slider */ function camp_excerpt_for_slider() { $excerpt = get_the_excerpt(); $words = explode( ' ', $excerpt ); if ( count( $words ) > 20 ) { array_splice( $words, 20 ); $excerpt = implode( ' ', $words ); echo $excerpt . '...'; } else echo $excerpt; } /* Comments */ function camp_comment_callback() { ?>
  • id = "comment-">
    'div-comment', 'depth' => 1, 'max_depth' => 10, 'reply_text' => __( 'Reply', 'camp' ) ) ); edit_comment_link( __( 'Edit', 'camp' ), ' | ', '' ); ?>
    '; previous_posts_link( __( 'Newer posts →', 'camp' ) ); echo ''; } if ( get_next_posts_link() ) { echo '
    '; next_posts_link( __( '← Older posts', 'camp' ) ); echo '
    '; } if ( is_single() ) { if ( get_previous_post_link() ) { echo '
    '; previous_post_link( '%link', __( 'Next post →', 'camp' ) ); echo '
    '; } if ( get_next_post_link() ) { echo '
    '; next_post_link( '%link', __( '← Previous post', 'camp' ) ); echo '
    '; } } } /* Title */ function camp_wp_title( $title ) { global $page, $paged; $title .= get_bloginfo( 'name' ); if ( is_single() || is_page() ) $title .= ' | ' . get_the_title(); if ( $page > 1 || $paged > 1 ) $title .= sprintf( __( ' | Page %s', 'camp' ), max( $page, $paged) ); return $title; } /* Hooks */ add_action( 'wp_enqueue_scripts', 'camp_add_scripts' ); add_filter( 'wp_print_scripts', 'pie' ); add_action( 'after_setup_theme', 'camp_setup' ); add_action( 'add_meta_boxes', 'camp_add_metabox_for_slider' ); add_action( 'save_post', 'camp_add_post_to_slider_ap' ); add_filter( 'wp_title', 'camp_wp_title' ); add_action( 'wp_head', 'camp_add_post_to_slider_fe' ); add_action( 'camp_excerpt', 'camp_excerpt_for_slider' ); add_action( 'camp_post_nav', 'camp_post_navigation' ) ?>