A
A
agromov912020-04-26 16:52:35
WordPress
agromov91, 2020-04-26 16:52:35

Extra pagination page on main WordPress?

I display posts on the main page as follows

<?php
  global $post;
  $postslist = get_posts( array( 'posts_per_page' => 10, 'category' => 5, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ) ) );
  foreach ( $postslist as $post ){
    setup_postdata($post);
  ?>
  <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
  <?php
    }
   wp_reset_postdata();  ?>
<?php the_posts_pagination();?>


Everything works as it should. But pagination always has a last blank page. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

10 answer(s)
V
Vladimir Pindurov, 2012-11-26
@fullsize

opencart.
Take the original.

M
mihavxc, 2012-11-27
@mihavxc

Support OpenCart. Lots of modules, good community, mint code.
I used OpenCart "ocStore" as I needed to deploy everything quickly. If the project is serious, then it is better to put the original one.

A
Alexey, 2012-11-27
@rixaman

I have not personally seen a ready-made free engine for an online store, tailored to the realities of Russia, no matter how much I have been looking for .
Certain solutions are suitable either only for an online storefront , or require investments in man/hours and thus can be more expensive than paid ones.
As a result, I came to the conclusion that a free CMS can only be used for your personal online store, modifying it to suit your needs as a hobby. For commercial orders, it is better to rely on a paid one, it will be easier.

I
Iliapan, 2012-11-26
@Iliapan

Ubercart

M
mopsicus, 2012-11-26
@mopsicus

Here you can choose cms, a list of both paid and free ones, and a discussion.
But I would advise you to immediately install paid cms with support, etc. For example Simpla. Excellent cms, fits all your parameters except for free of course ...

N
nikitasius, 2012-11-26
@nikitasius

3 years ago I set up a Russian site on magento . An analogue of the Chinese brothers ( http://www.bigboxsave.com/ and their entire database), only Russian.
The engine is quite heavy, but it worked for a large store (~ 12k goods).

M
mikemelnikov, 2012-11-27
@mikemelnikov

I would advise ProstoSale - everything is simple and convenient. And there is even a template editor :)

S
sharada, 2013-09-11
@sharada

Agree with rixaman. For six years now, I have moved to paid CMS engines, where at least the tasks of data exchange and connection of payment systems are solved taking into account Russian realities (yes, Yandex.Money, and where without it, 1C Accounting). And the share of the cost of the box in the cost of the project is overdramatized. Moreover, this price is equal to five or six orders from an online store (unless, of course, the store sells buttons at retail).

S
Sergey Predvoditelev, 2014-01-12
@NikoX

I don't think you'll find a completely free version. But given the rest of the requirements, I would pay attention to wordpress. I selected an online store plugin for myself on wordpress, wrote a post: predvoditelev.ru/wordpress_ecommerce_plugins

B
b3atb0x, 2018-05-14
@b3atb0x

There is a PHP/Yii2 system, not free: https://webkadabra.github.io/yii2-ecommerce-suite/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question