How to display blog post in homepage?

Discussion in 'Local Business WordPress Theme' started by hitechpanda, May 10, 2016.

  1. hitechpanda

    hitechpanda Member

    Joined:
    Aug 19, 2015
    Messages:
    36
    Likes Received:
    2
    Hi,

    How to display blog post in full content and not excerpt on homepage?
    This is what I want to achieve: http://prntscr.com/b28hv0

    The first version made it easy, but v2.0 doesn't seem to have this feature.

    Please assist.

    Thanks
     
  2. priya

    priya Guest

    Hello,

    Greetings from InkThemes!

    Please replace your home.php file code with below code..

    PHP:
    <?php
    /**
    * The template for displaying front page pages.
    *
    */
    get_header();
    ?> 
    <script type="text/javascript">
        jQuery(window).load(function () {
            jQuery('.flexslider').flexslider();
        });
    </script>       
    <div class="signup">
        <div class="row">
            <div class="col-md-6 col-sm-12">
                <div class="signupright">
                    <div class="signupimgbox">
                        <?php get_template_part'templates/flexslider' ); ?>
                    </div>
                </div>
            </div>   
            <div class="col-md-6 col-sm-12 frontpage_leadcapture">
                <?php localbusiness_form(); ?>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="signup-bottom"></div>
    <div class="feature_content">
        <?php
        
    /**
        * Include the template Feature Content Box
        */
        
    get_template_part'templates/feature-contentbox' );
        
    ?>
    </div>
    <div class="clear"></div>
    <div class="feature_info">
        <div class="row">
            <div class="col-md-8 col-sm-12">
                <div class="feature_infobox content-bar">
                    <h2><?php
                        
    /**
                        * Feature Info Box
                        */
                        
    if ( localbusiness_get_option'inkthemes_lefthead' ) != '' ) {
                            echo 
    stripslasheslocalbusiness_get_option'inkthemes_lefthead' ) );
                        } else {
                            
    _e"Our Taxi service is really awesome and you gonna love it."'local-business-pro' );
                        }
                        
    ?>
                    </h2>
                      <!-- Start the Loop. -->
                        <?php
                        
    // WP_Query arguments
                        
    $paged = (get_query_var'paged' )) ? get_query_var'paged' ) : 1;
                        
    $args = array(
                            
    'post_type' => array( 'post' ),
                            
    'paged' => $paged,
                            
    'post_status' => array( 'publish' )
                        );
     
    // The Query
                        
    $query = new WP_Query$args );
     
    // The Loop
                        
    if ( $query->have_posts() ) {
                            while ( 
    $query->have_posts() ) {
                                
    $query->the_post();
    ?>
                                <div class="post">
        <h1 class="post_title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
        <ul class="post_meta">
            <li class="post_date"><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span><?php echo get_the_time'M, d, Y' ?></li>
            <li class="posted_by"><span class="glyphicon glyphicon-user" aria-hidden="true"></span><?php the_author_posts_link(); ?></li>
            <li class="post_category"><span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span><?php the_category', ' ); ?></li>
            <?php if ( get_comments_number$post->ID ) > && !post_password_required() ) {
                
    ?>
                <li class="post_comment"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span><?php comments_popup_link__'No Comments.''local-business-pro' ), __'1 Comment.''local-business-pro' ), __'% Comments.''local-business-pro' ) ); ?></li>
            <?php ?>
        </ul>
        <div class="post_content"><?php if ( (has_post_thumbnail() ) ) { ?>
                <?php
                localbusiness_get_thumbnail
    300225 );
            } else {
                
    localbusiness_get_image300225 );
            }
            
    /**
            * Include the Excerpt
            */
            
    the_content();
            
    ?>
            <div class="clear"></div>
            <div class="row">
                <?php if ( has_tag() ) { ?>
                    <div class="col-md-9">
                        <div class="tag">
                            <?php the_tags'Post Tagged with '', ''' ); ?>
                        </div></div>
                <?php ?>
                <div class="col-md-3"><a class="read_more" href="<?php the_permalink(); ?>"><?php _e'Read More''local-business-pro' ); ?> </a>
                </div>
            </div>
        </div>
    </div><?php
                            
    }
                        } else {
                            
    // no posts found
                            
    ?>
                            <div class="post">
                                <p>
                                    <?php _e'Sorry, no posts matched your criteria.''localbusiness' ); ?>
                                </p>
                            </div>
                            <?php
                        
    }
     
    // Restore original Post Data
                        
    wp_reset_postdata();
                        
    ?>
     
                        <!--End Loop-->
                </div>
            </div>
            <div class="col-md-4 col-sm-12">
                <?php if ( !is_active_sidebar'home-widget-area' ) ) { ?>
                    <div class="feature_videobox"><iframe width="560" height="215" src="<?php echo esc_url'http://www.youtube.com/embed/4Kf3IKUztjM' ); ?>" allowfullscreen></iframe></div>
                        <?php }
                        else{
                        echo 
    '<div class = "sidebar">' ;
                            
    dynamic_sidebar('home-widget-area');
                        echo 
    '</div>';
                        }
                        
    ?>   
            </div>
        </div>
    </div>
    <?php
    get_footer
    ();
    ?>
    And after that, paste the code given below in Custom CSS field of your dashboard.
    Code:
    .content-bar img {
        width: 260px;
        height: auto;
    }
    Hope it will resolve your issue

    Do let me know if you need more assistance,

    Thanks & Regards!
    Priyanka
    InkThemes.com
     

Share This Page