コード例 #1
0
ファイル: magazine.php プロジェクト: jimdough/Roadmaster
<?php

/**
 * Template Name: Magazine Home
 *
 * @package xinmag
 * @since 1.0
 */
get_header();
?>
<div id="content" class="<?php 
echo xinwp_content_class();
?>
" role="main">
<?php 
global $xinmag_options, $xinmag_headlines;
$post_pp = $xinmag_options['fp_postnum'];
// All Posts
//	if ( 1 == $xinmag_options['fp_option']  && 0 == $xinmag_options['fp_category'] )
//		$post_pp = 3;
$featured_args = array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $post_pp, 'ignore_sticky_posts' => 1, 'no_found_rows' => 1);
if ($xinmag_options['fp_category'] > 0 && 1 == $xinmag_options['fp_option']) {
    $featured_args['category__in'] = $xinmag_options['fp_category'];
} elseif (2 == $xinmag_options['fp_option']) {
    $featured_args['meta_query'] = array(array('key' => '_xinmag_featured', 'value' => 1, 'compare' => 'IN'));
}
$xinmag_headlines = array();
$featured = new WP_Query($featured_args);
$count = 0;
if ($featured->have_posts()) {
    $thumbs = array();
コード例 #2
0
ファイル: hooks.php プロジェクト: jimdough/Roadmaster
function xinwp_woocommerce_content_wrapper()
{
    echo '<div id="content" class="' . xinwp_content_class() . '">';
}
コード例 #3
0
ファイル: portfolio.php プロジェクト: jimdough/Roadmaster
    $xinwp_entry_meta = get_post_meta($post->ID, '_xinmag_disp_meta', true);
    $sidebar = get_post_meta($post->ID, '_xinmag_sidebar', true);
    xinmag_template_intro();
} else {
    $pt_category = '';
    $xinwp_display_excerpt = 1;
    $column = 1;
    $postperpage = 0;
    $xinwp_thumbnail = 'thumbnail';
    $xinwp_entry_meta = 1;
    $sidebar = 1;
}
?>
  
<div id="content" class="<?php 
echo $sidebar ? xinwp_content_class() : xinwp_grid_full();
?>
" role="main">
<div class="xinwp_recent_post portfolio column-<?php 
echo $column;
?>
">
<input type="hidden" id="portfolio-column" value="<?php 
echo $column;
?>
">
<?php 
$blog_args = array('post_type' => 'post', 'post_status' => 'publish', 'paged' => $paged, 'posts_per_page' => $postperpage);
if ($pt_category) {
    $blog_args['category__in'] = $pt_category;
}
コード例 #4
0
ファイル: single.php プロジェクト: jimdough/Roadmaster
<?php

/**
 * The Template for displaying all single posts.
 *
 * @package xinmag
 * @since xinmag 1.0
 */
global $xinmag_layout;
$xinmag_layout = get_post_meta($post->ID, '_xinmag_layout', true);
get_header();
?>
	<div id="content" class="<?php 
echo $xinmag_layout ? xinwp_grid_full() : xinwp_content_class();
?>
" role="main">
<?php 
while (have_posts()) {
    the_post();
    get_template_part('content', get_post_format());
    ?>

			<nav id="nav-single" class="clearfix">
				<span class="nav-previous"><?php 
    previous_post_link('%link', '<span class="meta-nav">' . _x('<i class="icon-chevron-left"></i>', 'Previous post link', 'xinmag') . '</span> %title');
    ?>
</span>
				<span class="nav-next"><?php 
    next_post_link('%link', '%title <span class="meta-nav">' . _x('<i class="icon-chevron-right"></i>', 'Next post link', 'xinmag') . '</span>');
    ?>
</span>