";
$args = array( 'numberposts' => '5' );
$recent_posts = wp_get_recent_posts( $args );
foreach( $recent_posts as $recent ){
echo '' . $recent["post_title"].' ';
}
echo "";
}
?>
bgbn_get_default( 'background_color' ),
'default-image' => bgbn_get_default( 'background_image' ),
'default-repeat' => bgbn_get_default( 'background_repeat' ),
'default-position-x' => bgbn_get_default( 'background_position_x' ),
'default-attachment' => bgbn_get_default( 'background_attachment' ),
) );
// HTML5
add_theme_support( 'html5', array(
'comment-list',
'comment-form',
'search-form',
'gallery',
'caption'
) );
// Menu locations
register_nav_menus( array(
'primary' => __( 'Primary Menu', 'bgbn' ),
'social' => __( 'Social Profile Links', 'bgbn' )
) );
// Editor styles
$editor_styles = array();
if ( '' !== $google_request = bgbn_get_google_font_uri() ) {
$editor_styles[] = $google_request;
}
$editor_styles[] = 'css/font-awesome.css';
$editor_styles[] = 'css/editor-style.css';
// Another editor stylesheet is added via bgbn_mce_css() in inc/customizer/bootstrap.php
add_editor_style( $editor_styles );
}
endif;
add_action( 'after_setup_theme', 'bgbn_setup' );
if ( ! function_exists('bgbn_widget_init') ) :
/**
* Register widget areas
*
* @since 1.0.0.
*
* @return void
*/
function bgbn_widgets_init() {
register_sidebar( array(
'id' => 'sidebar-left',
'name' => __( 'Left Sidebar', 'bgbn' ),
'description' => bgbn_sidebar_description( 'sidebar-left' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'id' => 'sidebar-right',
'name' => __( 'Right Sidebar', 'bgbn' ),
'description' => bgbn_sidebar_description( 'sidebar-right' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'id' => 'footer-1',
'name' => __( 'Footer 1', 'bgbn' ),
'description' => bgbn_sidebar_description( 'footer-1' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'id' => 'footer-2',
'name' => __( 'Footer 2', 'bgbn' ),
'description' => bgbn_sidebar_description( 'footer-2' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'id' => 'footer-3',
'name' => __( 'Footer 3', 'bgbn' ),
'description' => bgbn_sidebar_description( 'footer-3' ),
'before_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'id' => 'footer-4',
'name' => __( 'Footer 4', 'bgbn' ),
'description' => bgbn_sidebar_description( 'footer-4' ),
'before_widget' => '',
'before_title' => '',
) );
}
endif;
add_action( 'widgets_init', 'bgbn_widgets_init' );
if ( ! function_exists( 'bgbn_head_early' ) ) :
/**
* Add items to the top of the wp_head section of the document head.
*
* @since 1.0.0.
*
* @return void
*/
function bgbn_head_early() {
// JavaScript detection ?>
implode( ',', $selector_array )
);
// Send to the script
wp_localize_script(
'bgbn-fitvids',
'bgbnFitVids',
$fitvids_custom_selectors
);
$script_dependencies[] = 'bgbn-fitvids';
// Global script
wp_enqueue_script('bgbn-global',
get_template_directory_uri() . '/js/global' . bgbn_SUFFIX . '.js',
$script_dependencies,
bgbn_VERSION,
true
);
// Comment reply script
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
endif;
add_action( 'wp_enqueue_scripts', 'bgbn_scripts' );
if ( ! function_exists( 'bgbn_cycle2_script_setup' ) ) :
/**
* Enqueue Cycle2 scripts
*
* If the environment is set up for minified scripts, load one concatenated, minified
* Cycle 2 script. Otherwise, load each module separately.
*
* @since 1.0.0.
*
* @param array $script_dependencies Scripts that Cycle2 depends on.
*
* @return void
*/
function bgbn_cycle2_script_setup( $script_dependencies ) {
if ( defined( 'BGBN_SUFFIX' ) && '.min' === BGBN_SUFFIX ) {
wp_enqueue_script(
'bgbn-cycle2',
get_template_directory_uri() . '/js/libs/cycle2/jquery.cycle2' . BGBN_SUFFIX . '.js',
$script_dependencies,
BGBN_VERSION,
true
);
} else {
// Core script
wp_enqueue_script(
'bgbn-cycle2',
get_template_directory_uri() . '/js/libs/cycle2/jquery.cycle2.js',
$script_dependencies,
'2.1.3',
true
);
// Vertical centering
wp_enqueue_script(
'bgbn-cycle2-center',
get_template_directory_uri() . '/js/libs/cycle2/jquery.cycle2.center.js',
'bgbn-cycle2',
'20140121',
true
);
// Swipe support
wp_enqueue_script(
'bgbn-cycle2-swipe',
get_template_directory_uri() . '/js/libs/cycle2/jquery.cycle2.swipe.js',
'bgbn-cycle2',
'20121120',
true
);
}
}
endif;
if ( ! function_exists( 'bgbn_head_late' ) ) :
/**
* Add additional items to the end of the wp_head section of the document head.
*
* @since 1.0.0.
*
* @return void
*/
function bgbn_head_late() { ?>