0

First time poster, my name is Johnny. :)

I've built an archive page for my website that I'm very proud of (using Elementor), but I don't want the homepage of this theme to paginate. I want the homepage to display the 6 most recent posts and that if readers would like to find more that they have to click on the archive page at the top.

Full disclosure: I'm a complete n00b at programming of any kind. I've done some VERY basic python before, but that's about it.

I've found the code to do with pagination and it looks like this:

?>
<div class="grids grids1">
    <div class="name-post">
        <h2 class="title-home"><?php echo __('Recent Uitvergroot', 'goblog-free'); ?></h2>
    </div>
    <?php if ( have_posts() ): ?>
        <?php while( have_posts() ): the_post(); ?>
        <div class="box-content">
            <div class="content">
                <div class="categoris">
                    <?php goblog_free_the_category(); ?>
                </div>
                <?php goblog_free_title_post(); ?>
                <div class="box-content-info">
                    <?php goblog_free_content_info(); ?>
                </div>
                <p><?php echo goblog_free_get_excerpt(); ?></p>
            </div>
            <div class="content-gambar">
                <?php goblog_free_thumbnail_post(); ?>
            </div>
        </div>
    <?php    
        endwhile;
        goblog_free_pagination_default();
        else: get_template_part( 'template-parts/none/no', 'post' ); 
    endif; ?>
</div>

What do I edit to make sure that my theme stops paginating without breaking the homepage? URL to the homepage: https://www.RationeleStem.nl

Thank you very much for your time!

Kind regards,

Johnny

1
  • Are you using a third party theme? Jan 3 '21 at 22:24
0

It looks like you could just comment out the pagination function - but we can't see what that actually does, so this is a guess:

// goblog_free_pagination_default();
1
  • 1
    I had no idea the solution was that simple, thank you very much, that worked!
    – Thalasaur
    Jan 4 '21 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.