Hello everyone,
I am a newbie when it comes to your theme and the tagDiv Composer. Though I believe there is still some way to go regarding the development of the tagDiv Composer, I find it a very good builder that has all the required elements to build a news portal. My first attempt at utilizing your Newspaper theme to build such a portal is with the http://www.vasilisaivalis.gr website.
On the aforementioned site, I have created a Category template using the Cloud templates. This template utilizes the Flex Block 1 to present some people (candidates). Each person (candidate) on this list has a single post dedicated to him. So, the Flex Block 1 takes on the task of presenting all the posts that belong to the post category “Candidates” and it does that in a very good way.
A required characteristic of this presentation is that the Candidates (posts that belong on the post category named “Candidates”) are being displayed in a random order rather than alphabetically, time added or any other way for obvious reasons. Unfortunately, the “random” sort order does not work as intended. To be more specific, I guess there is a bug due to which some of the 111 candidates (the plan is that another 70 candidates at least will be added on the list) appear twice on the list (or three times I guess). Therefore, if candidate A appears on the list twice, in addition to the obvious problem that arises, there will be on candidate from the rest that will never appear because his slot will be taken from the candidate A. It seems like the database query that is being sent when loading more candidates via pagination method does not take into account the candidates (posts) that already appeared. Screenshot of the problem here.
Am I doing something wrong with the Flex Block 1 configuration? I guess if this bug actually existed then someone would have already brought it to your attention and you would have already fixed it. Using the Posts Loop widget would be more than fine for me but it does not seem to provide the random sort option at all. The initial Newspaper theme deployment was at version 12.5 and I just upgraded it to 12.5.1 but nothing changed. The WordPress core is at version 6.3.
I would be more than happy to provide administrator credentials to the support staff of the development team if needed. Until the problem is fixed, I am using the Posts Loop 2 widget with the “oldest posts” sort order.
Thank you for taking the time to read my topic.
Hello @agiannaros !
You can use a flex block with only one filter, and it will work. The random sort will not take into account which post will be displayed. Read all about it here: https://forum.tagdiv.com/flex-block-settings-guide/
Thank you!
Thank you your fast reply Bettina!
I am using the Flex Block with only one filter and the result I am getting is the one described in my original post. You can see the Flex Block 1 configuration here. Did I do something wrong in the configuration?
In the url you provided, it states clearly “Do not use this sorting option together with pagination as it could result in duplicate posts.”. So, there is no way at all to use the Flex Block with random sort order and pagination at the same time? If so, I think it is a very weird limitation. Haven’t seen such a limitation on other WordPress themes like Avada or in PHP Frameworks like CodeIgniter. I am sure there is something the development team can do to fix this bug.
Hello @agiannaros !
The settings are correct. Please re-check again, save the changes in the TagDiv Composer, clear all the cache, and see the results.
You can use it, but a post can be displayed twice.
Thank you!
I understand Bettina. For a post to be displayed twice is a dealbreaker. Is there something me or the theme’s development team can do to tackle this bug?
In the end of the day, I want to use Flex Block or Posts Loop to display all of the posts of a single category with random order and pagination at the same time. I do not think that this is a special request.
Hello @agiannaros !
I will add this request to our improvement list!
I hope our developers will change this functionality.
Thank you so much for understanding!
Ok Bettina I will be on hold for a fix on this 🙂
Until the time comes when the fix is introduced with a next theme’s update, I would really appreciate a custom php function to place in the child theme’s functions.php file to sort this out. If the development team could make one I would really appreciate it.
Thank you for your co-operation.
Hello @agiannaros !
Unfortunately, we couldn’t provide a fix because this functionality was built like that. So, in order to change the functionality, we should change the feature itself.
Thank you so much for your understanding!
Ok Bettina I am going to wait for a future theme update that fixes the incompatibility between random sort order and pagination.
Thank you again.