• I created Template which show last posts in current page .
    This is a code but dosent make query from posts and just show current Page as Thumbnail !
    The same code for Homepage work fine but for Template-page dosent work correctly .
    I use the Theme “Babylos” -Smartcat – on WordPress 4.3

    <?php if (have_posts()) : ?>
                    <?php /* Start the Loop */ ?>
                    <?php while (have_posts()) : the_post(); ?>
                        <div class="item-post">
                            <a href="<?php the_permalink(); ?>">
                                <?php if(has_post_thumbnail() ) : the_post_thumbnail('large'); ?>
                                <?php else :  ?>
                                <img src="<?php echo get_template_directory_uri(); ?>/images/post_image.jpg" class="wp-post-image" />
                                <?php endif; ?>
                                <h2 class="post-title"><?php the_title(); ?></h2>
                            </a>

The topic ‘Query from Post dosent work !’ is closed to new replies.