Move into wp-content path
Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for the Front Page Post Section Two
|
||||
*
|
||||
* @package Pirate Rogue
|
||||
* @since Pirate Rogue 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php
|
||||
$posttag = get_theme_mod('pirate_rogue_front_section_two_tag');
|
||||
$tag_link = get_tag_link( $posttag );
|
||||
|
||||
$postcat = get_theme_mod('pirate_rogue_front_section_two_cat');
|
||||
$category_link = get_category_link($postcat);
|
||||
|
||||
$pirate_rogue_section_two_first_query = new WP_Query( array(
|
||||
'posts_per_page' => 1,
|
||||
'post_status' => 'publish',
|
||||
'tag_id' => $posttag,
|
||||
'cat' => $postcat,
|
||||
'ignore_sticky_posts' => 1,
|
||||
) );
|
||||
|
||||
|
||||
$args = array(
|
||||
'posts_per_page' => 8,
|
||||
'offset' => 1,
|
||||
'post_status' => 'publish',
|
||||
'tag_id' => $posttag,
|
||||
'cat' => $postcat,
|
||||
'ignore_sticky_posts' => 1,
|
||||
);
|
||||
|
||||
$pirate_rogue_section_two_second_query = new WP_Query( $args );
|
||||
?>
|
||||
|
||||
<section id="front-section-two" class="front-section cf">
|
||||
|
||||
<?php if ( '' != get_theme_mod( 'pirate_rogue_front_section_two_title' ) && '' != get_theme_mod( 'pirate_rogue_front_section_two_cat') ) : ?>
|
||||
<h3 class="front-section-title"><?php echo esc_html( get_theme_mod( 'pirate_rogue_front_section_two_title' ) ); ?><span><a class="all-posts-link" href="<?php echo esc_url( $category_link ); ?>"><?php esc_html_e('All posts', 'pirate-rogue') ?></a></span></h3>
|
||||
<?php elseif ( '' != get_theme_mod( 'pirate_rogue_front_section_two_title' ) && '' != get_theme_mod( 'pirate_rogue_front_section_two_tag' ) ) : ?>
|
||||
<h3 class="front-section-title"><?php echo esc_html( get_theme_mod( 'pirate_rogue_front_section_two_title' ) ); ?><span><a class="all-posts-link" href="<?php echo esc_url( $tag_link ); ?>"><?php esc_html_e('All posts', 'pirate-rogue') ?></a></span></h3>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="section-two-column-one">
|
||||
<?php if($pirate_rogue_section_two_first_query->have_posts()) {
|
||||
while($pirate_rogue_section_two_first_query->have_posts()) {
|
||||
$pirate_rogue_section_two_first_query->the_post();
|
||||
get_template_part('template-parts/content-frontpost-big' );
|
||||
}
|
||||
|
||||
} // have_posts() ?>
|
||||
|
||||
</div><!-- end .section-two-column-one -->
|
||||
|
||||
<div class="section-two-column-two columns-wrap">
|
||||
<?php if($pirate_rogue_section_two_second_query->have_posts()) : ?>
|
||||
<?php while($pirate_rogue_section_two_second_query->have_posts()) : $pirate_rogue_section_two_second_query->the_post() ?>
|
||||
|
||||
|
||||
<?php get_template_part('template-parts/content-frontpost-small' ); ?>
|
||||
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php endif; // have_posts() ?>
|
||||
|
||||
<?php wp_reset_postdata(); ?>
|
||||
|
||||
</div><!-- end .section-two-column-two -->
|
||||
</section><!-- end #front-section-two -->
|
||||
Reference in New Issue
Block a user