File "home_temp.php"

Full Path: /home/mba/public_html/wp-content-20250804013034-20250807183448/themes/twentytwenty-child-theme/home_temp.php
File size: 17.98 KB
MIME-type: text/x-php
Charset: utf-8

<?php 
/* Template Name: Home 
*/
get_header();

?>
  <div class="jl_home_bw">
                    <section class="home_section1">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="jl_mright_wrapper jl_clear_at">
                                        <div class="jl_mix_post">
										<?php $args = array( 'post_type' => 'post','posts_per_page' => '1','post_status'    => 'publish','category_name'=>'Business','orderby' => 'publish_date','order' => 'DESC',);
					$posts = get_posts( $args );

					 foreach ($posts as $post) :  
					 setup_postdata($post);
					 
					$date = get_the_date();
					$category = get_the_category($post);
					
					$thumb_id = get_post_thumbnail_id(get_the_ID());
					$alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true);
					if(empty($alt)){
						$alt= "featured Image";
					}
					?>
                                            <div class="jl_m_center blog-style-one blog-small-grid">
                                                <div class="jl_m_center_w jl_radus_e">
                                                    <div class="jl_f_img_bg" style="background-image: url('<?php echo get_the_post_thumbnail_url(get_the_ID(),"full");?>');"></div>
                                                    <a href="<?php the_permalink();?>" class="jl_f_img_link"></a>
                                                    <div class="text-box">
                                                        <span class="jl_f_cat"><a class="post-category-color-text"  href="<?php echo get_category_link($category[0]->term_id); ?>"><?php if ( ! empty( $category ) )  { echo esc_html( $category[0]->name );   }?></a></span>
                                                        <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                                                        <span class="jl_post_meta">
                                                            <span class="jl_author_img_w"><i class="jli-user"></i><a href="<?php echo get_author_posts_url($post->post_author);?>" title="Posts by <?php echo strtoupper(get_the_author()); ?>" rel="author"><?php echo strtoupper(get_the_author()); ?></a></span>
                                                            <span class="post-date"><i class="jli-pen"></i><?php echo $date; ?></span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
					<?php  
					endforeach; 
					wp_reset_postdata();
					?>
					<?php $args = array( 'post_type' => 'post','posts_per_page' => '4','offset'=>1,'post_status'    => 'publish','category_name'=>'Business','orderby' => 'publish_date','order' => 'DESC',);
					$posts = get_posts( $args );

					 foreach ($posts as $post) :  
					 setup_postdata($post);
					 
					$date = get_the_date();
					$category = get_the_category($post);
					
					$thumb_id = get_post_thumbnail_id(get_the_ID());
					$alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true);
					if(empty($alt)){
						$alt= "featured Image";
					}
					?>
                                            <div class="jl_m_right">
                                                <div class="jl_m_right_w">
                                                    <div class="jl_m_right_img jl_radus_e">
                                                        <a href="<?php the_permalink(); ?>">
                                                            <img
                                                                width="100"
                                                                height="100"
                                                                src="<?php echo get_the_post_thumbnail_url(get_the_ID(),"full");?>"
                                                                class="attachment-_small_feature size-_small_feature wp-post-image"
                                                                alt="<?php echo $alt; ?>"
                                                                loading="lazy"
                                                            />
                                                        </a>
                                                    </div>
                                                    <div class="jl_m_right_content">
                                                        <span class="jl_f_cat"><a class="post-category-color-text"  href="<?php echo get_category_link($category[0]->term_id); ?>"><?php if ( ! empty( $category ) )  { echo esc_html( $category[0]->name );   }?></a></span>
                                                        <h3 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                                                        <span class="jl_post_meta">
                                                            <span class="jl_author_img_w"><i class="jli-user"></i><a href="<?php echo get_author_posts_url($post->post_author);?>" title="Posts by <?php echo strtoupper(get_the_author()); ?>" rel="author"><?php echo strtoupper(get_the_author()); ?></a></span>
                                                            <span class="post-date"><i class="jli-pen"></i><?php echo $date; ?></span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
                                         <?php  
					endforeach; 
					wp_reset_postdata();
					?>   
                                          
                                         
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="home_section2">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-12">
                                    <div
                                        id="blockid_72be465"
                                        class="block-section jl-main-block"
                                        data-blockid="blockid_72be465"
                                        data-name="jl_mgrid"
                                        data-page_max="11"
                                        data-page_current="1"
                                        data-author="none"
                                        data-order="date_post"
                                        data-posts_per_page="6"
                                        data-offset="5"
                                    >
                                        <div class="jl_grid_wrap_f jl_clear_at g_3col">
                                            <div class="jl-roww content-inner jl-col3 jl-col-row">
                                                <div class="jl_sec_title">
                                                    <h3 class="jl_title_c"><span>Editors Picks Post</span></h3>
                                                    <p>This is an optional subtitle for post section</p>
                                                </div>
												
												 	<?php 
$args = array(
'post_type'=> 'post',
'post_status' => 'publish',
'meta_key'   => '_is_ns_featured_post',
  'meta_value' => 'yes',
'posts_per_page' => 6 // this will retrive all the post that is published 
);
$result = new WP_Query( $args );
if ( $result-> have_posts() ) :
$i=0;
while ( $result->have_posts() ) : $result->the_post();
$date = get_the_date();
$category = get_the_category();
$post_author_id = get_post_field( 'post_author', get_the_ID() );
$i++;
?>
                                                <div class="jl-grid-cols">
                                                    <div class="p-wraper post-2959">
                                                        <div class="jl_grid_w">
                                                            <div class="jl_img_box jl_radus_e">
                                                                <a href="<?php the_permalink(); ?>">
                                                                    
                                                                    <img
                                                                        width="500"
                                                                        height="350"
                                                                        src="<?php echo get_the_post_thumbnail_url(get_the_ID(),"full");?>"
                                                                        class="attachment-_slider_grid_small size-_slider_grid_small wp-post-image"
                                                                        alt="featured-<?php echo $i; ?>"
                                                                        loading="lazy"
                                                                    />
                                                                </a>
                                                                <span class="jl_f_cat"><a class="post-category-color-text"  href="<?php echo get_category_link($category[0]->term_id); ?>"><?php if ( ! empty( $category ) )  { echo esc_html( $category[0]->name );   }?></a></span>
                                                            </div>
                                                            <div class="text-box">
                                                                <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                                                                <span class="jl_post_meta">
                                                                    <span class="jl_author_img_w"><i class="jli-user"></i><a href="<?php echo 
get_author_posts_url($post_author_id);?>" title="Posts by <?php echo strtoupper(get_the_author()); ?>" rel="author"><?php echo strtoupper(get_the_author()); ?></a></span>
                                                                    <span class="post-date"><i class="jli-pen"></i><?php echo $date; ?></span>
                                                                </span>
                                                                <p><?php  
																 echo wp_trim_words( get_the_content(), 15, '...' );
																?></p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                
                                            <?php 
endwhile;
endif; wp_reset_postdata();
?>       
                                                
                                            </div>
                                           
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                    <section class="home_section3">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-12 text-center">
                                 
                                        <h3 class="jl_title_c mb-1">Boost your viral exposure to influencers and decision-makers on one unified platform.</h3>
                                        <p>This is an optional subtitle for post section</p>
                                   
                                    <div class="jl_lmore_c">
									<?php

									
									if(!is_user_logged_in()){
									?>
                                                    <a href="<?php echo site_url('login/');?>" class="jl-load-link"><span>Register Now</span></a>
									<?php 
									}else{
										?>
										<a href="https://millionaire-business-articles.com/creator/" class="jl-load-link"><span>Submit Article</span></a>
										<?php
									}
									?>
                                                </div>
                            </div>
                            </div>
                        </div>
                    </section>
                    
                    
                    
                    <section class="home_section7">
                        <div class="container">
                            <div class="row">
                                <div class="col-md-12">
                                    <div id="blockid_84d79c5" class="block-section jl-main-block">
                                        <div class="jl_grid_wrap_f jl_sf_grid jl_clear_at">
                                            <div class="jl-roww content-inner jl-col3 jl-col-row">
                                                <div class="jl_sec_title">
                                                    <h3 class="jl_title_c"><span>Today Stories</span></h3>
                                                    <p>This is an optional subtitle for post section</p>
                                                </div>
												<?php $args = array( 'post_type' => 'post','posts_per_page' => '6','post_status'    => 'publish','category_name'=>'Finance','orderby' => 'publish_date','order' => 'DESC',);
					$posts = get_posts( $args );

					 foreach ($posts as $post) :  
					 setup_postdata($post);
					 
					$date = get_the_date();
					$category = get_the_category($post);
					
					$thumb_id = get_post_thumbnail_id(get_the_ID());
					$alt = get_post_meta($thumb_id, '_wp_attachment_image_alt', true);
					if(empty($alt)){
						$alt= "finance Image";
					}
					?>
												
                                                <div class="jl-grid-cols">
                                                    <div class="p-wraper post-1614">
                                                        <div class="jl_m_right jl_sm_list jl_ml jl_clear_at">
                                                            <div class="jl_m_right_w">
                                                                <div class="jl_m_right_img jl_radus_e">
                                                                    <a href="<?php the_permalink(); ?>">
                                                                        <img
                                                                            width="450"
                                                                            height="450"
                                                                            src="<?php echo get_the_post_thumbnail_url(get_the_ID(),"full");?>"
                                                                            class="attachment-_feature_small size-_feature_small wp-post-image"
                                                                            alt="<?php echo $alt; ?>"
                                                                            loading="lazy"
                                                                        />
                                                                    </a>
                                                                </div>
                                                                <div class="jl_m_right_content">
                                                                    <span class="jl_f_cat"><a class="post-category-color-text"  href="<?php echo get_category_link($category[0]->term_id); ?>"><?php if ( ! empty( $category ) )  { echo esc_html( $category[0]->name );   }?></a></span>
                                                                    <h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                                                                    <span class="jl_post_meta">
                                                                        <span class="jl_author_img_w"><i class="jli-user"></i><a href="<?php echo get_author_posts_url($post->post_author);?>" title="Posts by <?php echo  strtoupper(get_the_author()); ?>" rel="author"><?php echo  strtoupper(get_the_author()); ?></a></span>
                                                                        <span class="post-date"><i class="jli-pen"></i><?php echo $date;?></span>
                                                                    </span>
                                                                    <p><?php  
																 echo wp_trim_words( get_the_content(), 10, '...' );
																?></p>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                
                                         <?php  
					endforeach; 
					wp_reset_postdata();
					?>       
                                                
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </div>

<style>
.td-header-wrap .td-header-menu-wrap-full, .td-header-menu-wrap.td-affix, .td-header-style-3 .td-header-main-menu, .td-header-style-3 .td-affix .td-header-main-menu, .td-header-style-4 .td-header-main-menu, .td-header-style-4 .td-affix .td-header-main-menu, .td-header-style-8 .td-header-menu-wrap.td-affix, .td-header-style-8 .td-header-top-menu-full {
    background-color: transparent !important;
}
</style>
<?php 
get_footer();
?>