Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header();
- /**
- * Template Name: Front-Page Template
- *
- * This is the template that displays all pages by default.
- * Please note that this is the WordPress construct of pages
- * and that other 'pages' on your WordPress site may use a
- * different template.
- *
- * @link https://codex.wordpress.org/Template_Hierarchy
- *
- * @package Tar
- */
- ?>
- <?php if( get_theme_mod( 'cta_background_image_setting' != "" , get_template_directory_uri(). '/assets/images/banner.jpg')): ?>
- <!-- start welcome text -->
- <section class="welcome-text" >
- <h2><?php echo do_shortcode(get_theme_mod('cta_welcome_text' , esc_html__( 'Advance. Strong. Reliable', 'tar') ) ); ?></h2>
- <p><?php echo do_shortcode( get_theme_mod('cta_welcome_text_p' , esc_html__('A clean bloat free WordPress theme for your site', 'tar') ) ); ?></p>
- <a class="xxx" href="<?php echo do_shortcode(esc_url(get_theme_mod('cta_button_href', '##'))); ?>"> <button><?php echo do_shortcode(esc_html(get_theme_mod( 'cta_button' , __('', 'tar')))); ?></button></a>
- </section>
- <!-- end welcome text -->
- <?php endif; ?>
- <!-- start feature-list -->
- <section class="features-list">
- <h4><?php echo do_shortcode(get_theme_mod( 'features_head_text_settings' , __('Use this block to show three key features', 'tar'))); ?></h4>
- <div class="features-block-wrap">
- <!--FEATURE BLOCK 1-->
- <?php
- $block1_tt = get_theme_mod( 'features_one_settings' , esc_html__('Dolore Libero', 'tar'));
- $block1_para = get_theme_mod( 'features_one_para_settings' , esc_html__('Aenean vel justo nulla, at gravida elit. In hac habitasse platea dictumst. Quisque gravida commodo volutpat. Vivamus blandit risus in urna venenatis accumsan.', 'tar'));
- $block1_icon = get_theme_mod('features_one_icon' ,'fa-car' );
- if( !empty($block1_tt) || !empty($block1_tt) ) { ?>
- <div class="features-block-one features-block">
- <div class="icon-one">
- <span class="fa <?php echo $block1_icon; ?>"></span>
- </div>
- <h3><?php echo do_shortcode($block1_tt); ?></h3>
- <p><?php echo do_shortcode($block1_para); ?></p>
- </div>
- <?php } ?>
- <!--FEATURE BLOCK 1 END-->
- <!--FEATURE BLOCK 2-->
- <?php
- $block2_tt = get_theme_mod( 'features_two_settings' , esc_html__('Dolore Libero', 'tar'));
- $block2_para = get_theme_mod( 'features_two_para_settings' , esc_html__('Aenean vel justo nulla, at gravida elit. In hac habitasse platea dictumst. Quisque gravida commodo volutpat. Vivamus blandit risus in urna venenatis accumsan.', 'tar'));
- $block2_icon = get_theme_mod('features_two_icon' ,'fa-bolt' );
- if( !empty($block2_tt) || !empty($block2_tt) ) { ?>
- <div class="features-block-one features-block">
- <div class="icon-one">
- <span class="fa <?php echo $block2_icon; ?>"></span>
- </div>
- <h3><?php echo do_shortcode($block2_tt); ?></h3>
- <p><?php echo do_shortcode($block2_para); ?></p>
- </div>
- <?php } ?>
- <!--FEATURE BLOCK 2 END-->
- <!--FEATURE BLOCK 2-->
- <?php
- $block3_tt = get_theme_mod( 'features_three_settings' , esc_html__('Dolore Libero', 'tar'));
- $block3_para = get_theme_mod( 'features_three_para_settings' , esc_html__('Aenean vel justo nulla, at gravida elit. In hac habitasse platea dictumst. Quisque gravida commodo volutpat. Vivamus blandit risus in urna venenatis accumsan.', 'tar'));
- $block3_icon = get_theme_mod('features_three_icon' ,'fa-glass' );
- if( !empty($block3_tt) || !empty($block3_tt) ) { ?>
- <div class="features-block-one features-block">
- <div class="icon-one">
- <span class="fa <?php echo $block3_icon; ?>"></span>
- </div>
- <h3><?php echo do_shortcode($block3_tt); ?></h3>
- <p><?php echo do_shortcode($block3_para); ?></p>
- </div>
- <?php } ?>
- <!--FEATURE BLOCK 2 END-->
- </div>
- <div class="clearfix"></div>
- </section>
- <!-- end feature-list -->
- <!-- start portfolio -->
- <section class="portfolio">
- <p><?php echo do_shortcode(get_theme_mod( 'porfolio_head_text', esc_html__('See our Portfolio', 'tar'))); ?></p>
- <?php $cat_id = intval( get_theme_mod( 'cats_elect', 1 ) ); ?>
- <?php $tarPosts = new WP_Query('cat='.$cat_id.'&posts_per_page=6&orderby=title&order=ASC'); ?>
- <?php ?>
- <?php while($tarPosts->have_posts()) : $tarPosts->the_post(); ?>
- <div class="portfolio-image">
- <?php the_post_thumbnail(); ?>
- <a href="<?php the_permalink(); ?>" class="image-section"> <?php the_title(); ?></a>
- </div>
- <?php endwhile; ?>
- <?php wp_reset_postdata(); ?>
- <div class="clearfix"></div>
- </section>
- <!-- end portfolio -->
- <!-- start bottom call to action -->
- <section class="bottom-call">
- <div class="call-section-one">
- <p><?php echo do_shortcode(get_theme_mod( 'second_cta_head_text', esc_html__('Ultrices ante sagittis nunc senectus libero netus', 'tar'))); ?></p>
- </div>
- <!-- <div class="clearfix"></div> -->
- <div class="call-section-two">
- <a href="<?php echo do_shortcode(esc_url(get_theme_mod('second_cta_button_href', '##'))); ?>"><button><?php echo do_shortcode(get_theme_mod( 'second_cta_button_text', esc_html__('See more', 'tar'))); ?></button></a>
- </div>
- </section>
- <!-- end bottom call to action -->
- <!-- start blog post -->
- <section class="frontpage-post-blog">
- <h4><?php echo do_shortcode(get_theme_mod( 'blog_head_text', esc_html__('Check out blog', 'tar'))); ?></h4>
- <?php $cat_id = intval( get_theme_mod( 'blog_cats', 1 ) ); ?>
- <div class="frontpage-post-wrapper">
- <?php
- if ( get_query_var('paged') ) {
- $paged = get_query_var('paged');
- } elseif ( get_query_var('page') ) {
- $paged = get_query_var('page');
- } else {
- $paged = 1;
- }
- $args = array(
- 'cat' => $cat_id,
- 'ignore_sticky_posts' => 1,
- 'post_type' => 'post',
- 'paged' => $paged,
- );
- $wp_query = new WP_Query( $args ); ?>
- <?php get_template_part( 'template-parts/loops' ); ?>
- <div class="front-page-pagination">
- <?php echo tar_home_pagination( $wp_query ); ?>
- </div>
- <?php wp_reset_postdata(); ?>
- </div>
- </section>
- <!-- end blog post -->
- <!-- start signup section -->
- <section class="frontpage-signup" >
- <p><?php echo do_shortcode(get_theme_mod( 'email_subscribe_header', esc_html__('Aenean vel justo nulla, at gravida elit. In hac habitasse platea dictumst. Quisque gravida commodo volutpat. Vivamus blandit risus in urna venenatis accumsan ', 'tar'))); ?></p>
- </section>
- <!-- end signup section -->
- </main><!-- #main -->
- </div><!-- #primary -->
- <section class="footer-widget">
- <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer') ) : endif; ?>
- <div class="clearfix"></div>
- </section>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement