• Hello!
    I am trying to make my own page template to replace the front page.
    I’m looking to generate every single circular link representing a blog post on homepage. At the moment I have it set to infinite scroll, but the problem with that dynamic scrolling is that the url changes to /page2 and when I navigate forward and then back, I’m stuck with half the page posts, and no header.

    This code below is the closest I’ve gotten, but the line “<?php get_template_part( ‘content’, ‘home’); ?>” does not generate circular thumbnails as links to the posts , instead it’s regular shaped images of varying sizes. Does anyone know how I can generate the circular posts the same way as the homepage?

    <?php
    
    get_header(); ?>
    
    		<div id="primary" class="content-area">
    			<div id="content" class="site-content" role="main">
    
    <?php
    $debut = 0; //The first article to be displayed
    ?>
    <?php while(have_posts()) : the_post(); ?>
    
    <?php
    global $post;
    $myposts = get_posts('numberposts=-1&offset=$debut');
    foreach($myposts as $post) :
    setup_postdata($post);
    ?>
    <?php get_template_part( 'content', 'home'); ?>
    
    <?php endforeach; ?>
    <?php endwhile; ?>
    
    			</div><!-- #content .site-content -->
    		</div><!-- #primary .content-area -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Duplicate Homepage In A Static Page’ is closed to new replies.