<?php get_header(); ?>
<div id="full-content" class="">
    <section style="background: url('<?php echo home_url(); ?>/wp-content/uploads/2018/11/media-coverage-banner-bg.jpg')no-repeat center/cover;"  class="media-banner-bg">  
        <div class="container">
            <h1 class="page-title-cus"><?php if(is_page(108)) { echo 'Newsletter'; } else { the_title(); } ?></h1>
        </div>
    </section>
    <div class="container posRelative">
    <div class="floatingDiv">
						<div id="stickyShare">	
						<div class="addthis_inline_share_toolbox"></div>
						</div>
					</div>
        <div class="row blog-details">
            <div class="col-md-8 col-12">
                <article class="single-blog-content">
                <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
                    <?php the_content(); ?>
                    <div class="disclaimer">
                        <p>Disclaimer</p>
                        <div class="disclaimer_content">
                             <?php if (get_field('disclaimer_note') ) { ?>
                            <?php echo get_field('disclaimer_note'); ?>
                            <?php } else { ?>
                            <p>Marcellus Investment Managers is regulated by the Securities and Exchange Board of India as a
                        provider of Portfolio Management Services and as an Investment Advisor.</p>
                                                    <p>The information provided on this Newsletter does not, and is not intended to, constitute
                        investment advice; instead, all information, content, and materials available on this newsletter are
                        for general informational purposes only.  Information on this website may not constitute the
                        most up-to-date information. The enclosed material is neither investment research, nor
                        investment advice. The contents and information in this document may include inaccuracies or
                        typographical errors and all liability with respect to actions taken or not taken based on the
                        contents of this Newsletter are hereby expressly disclaimed.  The content on this Newsletter is
                        provided &quot;as is;&quot; no representations are made that the content is error-free.</p>
                        <p>No reader, user, or browser of this Newsletter should act or refrain from acting on the basis of
                        information on this Newsletter without first seeking independent advice in that regard. Use of,
                        and access to, this website or any of the links or resources contained within the site do not create
                        an portfolio manager -client relationship between the reader, user, or browser and website
                        authors, contributors and their respective employers.  The views expressed at, or through, this
                        site are those of the individual authors writing in their individual capacities only.</p>
                                                    <?php } ?>
                                                    </div>
                                            </div>
                                        <?php endwhile; ?>
                                        <?php endif; ?>
                                        </article>
                    <section>
                   

                    <div class="nxt-prev-nav clearfix">  
                        <?php 
                           // print_r( get_previous_post());
                                        $prevPost = get_previous_post();
                                        $nextPost = get_next_post();
                                        $prevTitle = get_the_title( get_previous_post() );
                                        $nextTitle = get_the_title( get_next_post() );
                                        $prevDate = get_the_date($prevPost->post_date );
                                        $nextDate = get_the_date($nextPost->post_date );
                                        $previous_link_url = get_permalink( get_previous_post() );
                                        $next_link_url = get_permalink( get_next_post() );


                                        $prevThumb = get_the_post_thumbnail_url( get_previous_post(), 'thumbnail-size' );
                                        $nextThumb = get_the_post_thumbnail_url( get_next_post(), 'thumbnail-size' );

                                        if( empty($prevThumb)) {
                                           $prevThumb =  get_template_directory_uri().'/images/featured_default_image.jpg';
                                        }

                                        if( empty($nextThumb) ){
                                           $nextThumb = get_template_directory_uri().'/images/featured_default_image.jpg';
                                        }
                                        
                                        
                                ?>
                        <div class="row">
                            <div class="col-lg-6 col-md-6 col-6 prev">
                                 <?php if ($prevPost) { ?>
                                <div class="navigation-post">
                                    <p class="nav-label"><a href="<?php echo $previous_link_url ?>">Prev Newsletter</a></p>
                                     <div class="content">
                         
                                    <h5 class="post-title"><a href="<?php echo $previous_link_url ?>"><?php echo $prevTitle; ?></a></h5>
                                    <p class="read-more"><a href="<?php echo $previous_link_url ?>" class="view-detail">Read more</a></p>
                                   </div>
                                </div>
                                 <?php } ?>
                            </div>
                            <div class="col-lg-6 col-md-6 col-6 next">
								<?php if ($nextPost) { ?>
                                 <div class="navigation-post">
                                    <p class="nav-label text-right"><a href="<?php echo $next_link_url ?>">Next Newsletter</a></p>
                                    <div class="content">
                                        <h5 class="post-title"><a href="<?php echo $next_link_url ?>"><?php echo $nextTitle; ?></a></h5>
                                        <p class="read-more"><a href="<?php echo $next_link_url ?>" class="view-detail">Read more</a></p>
                                   </div>
                                </div>
                                <?php } ?>
                            </div>
                        </div>
                    </div>
                </section>
                 
            </div>
            <div class="col-md-4 col-12">
                <!--recent newsletter-->
                    <div class="sidebar-box posts-box">
                    <h5>Recent Newsletters</h5>
                   <div class="sidbar-posts newsletter-items">
                    <?php
                    //$args = array( 'numberposts' => '5' );
                    //$recent_posts = wp_get_recent_posts( $args );
                   
                    //foreach( $recent_posts as $recent ){
                        ?>
                       <?php
								$the_query = new WP_Query( array(
								'post_type'=>'Newsletter',
                                'posts_per_page'=>5,
								'order'=> 'DESC',
								'paged' => get_query_var('paged') ? get_query_var('paged') : 1) 
								); 
								 while ($the_query -> have_posts()) : $the_query -> the_post(); 
							?>
                        <div class="row post-item no-gutters">
                               
                                <div class="col-12">
                                    <div class="post-info">
                                         <p class="published"><span class="month"><?php the_time('M Y'); ?></span>&nbsp;&nbsp;&nbsp; Published on <span class="publish-date"><?php the_time('d M, Y'); ?></span></p>
                                        <h3><a href="<?php echo the_permalink() ?>"> <?php echo wp_trim_words( get_the_title(), 20 ); ?> </a></h5> 
                                    </div>
                                </div>
                            </div>
                        <?php //}
                    //wp_reset_query();
                ?>
                <?php endwhile; ?>	 
                </div>
                </div>
                <!--recent newsletter-->
            </div>
        </div>
    </div>
</div>



<div class="fixed-action-btn verticale clickToggleIcon">
		<a class="btn-floating">
			<img src="<?php bloginfo('template_directory'); ?>/images/share.svg" alt="">
		</a>        
	</div>
<!-- Pop Message HTMl-->
	 <?php include(TEMPLATEPATH.'/includes/forms/enquiry.php'); ?>
	  <!-- Pop Message End -->
<?php get_footer(); ?>