第一次海报,我叫约翰尼。:)
我已经为我的网站建立了一个档案页面,我非常自豪(使用元素),但我不希望这个主题的主页分页。我希望主页显示6个最近的文章,如果读者想要找到更多,他们必须点击档案页在顶部。
完全公开:我是一个完整的n00b在任何类型的编程。我以前做过一些非常基本的python,但仅此而已。
我找到了与分页有关的代码,如下所示:
?>
<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>我应该编辑什么来确保我的主题不再分页而不破坏主页?网址:https://www.RationeleStem.nl
非常感谢您的时间!
致以亲切的问候,
约翰尼
发布于 2021-01-03 21:55:42
看起来您可以注释掉分页函数--但是我们看不出它到底做了什么,所以这是一个猜测:
// goblog_free_pagination_default();https://wordpress.stackexchange.com/questions/380859
复制相似问题