Ejemplo n.º 1
0
/**
 * Loads the theme's javascript
 *
 * @package Alien Ship
 */
function alienship_js_loader()
{
    $alienship = wp_get_theme();
    /**
     * Load the theme scripts
     * If we're on the local environment or WP_DEBUG is enabled, load unminified versions
     */
    $script = 'true' == WP_DEBUG || 'true' == WP_LOCAL_DEV || 'true' == SCRIPT_DEBUG ? 'assets/js/scripts.js' : 'assets/js/scripts.min.js';
    wp_enqueue_script('scripts', alienship_locate_template_uri($script), array('jquery'), $alienship['Version'], true);
    // Comment reply script
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // Set some variables if we have featured content
    if (is_front_page() && alienship_has_featured_posts()) {
        $featured_content = 'true';
    } else {
        $featured_content = 'false';
    }
    wp_localize_script('scripts', 'alienship_js_vars', array('featured_content' => $featured_content));
}
Ejemplo n.º 2
0
<?php

/**
 * The main template file.
 *
 * @package Alien Ship
 */
get_header();
?>

		<div id="primary" class="content-area col-md-8">
			<main id="main" class="site-main" role="main">
			<?php 
if (is_front_page() && alienship_has_featured_posts()) {
    // Load featured post content
    get_template_part('/templates/parts/featured-content');
}
if (have_posts()) {
    // Start the Loop
    while (have_posts()) {
        the_post();
        do_action('alienship_loop_before');
        /* Include the Post-Format-specific template for the content.
         * If you want to override this in a child theme then include a file called content-___.php
         * (where ___ is the Post Format name) and that will be used instead.
         */
        get_template_part('/templates/parts/content', get_post_format());
        do_action('alienship_loop_after');
    }
    alienship_content_nav('nav-below');
    // display content nav below posts?