cedu
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: “Random” Sorry, no posts matched your criteria on permalinksHi Issa,
thanks for the hint. My install is more recent than end of January, so I didn’t try the patch. Yet I have good news, since I finally managed to solve my problems.
First for the “random” problem: of course, it was only apparently random. The issue was linked to post_date_gmt field, which was sometimes in the past, sometimes in the future for entries (didn’t check why, but I guess I created some entries differently). And since the real problem was related to dates, this info was important.Regarding the viewing of future entries, there are 2 modifications to apply to classes.php (at least it works this way for me, although it’s dirty work) :
First find this line and comment it (I took this hint from another forum entry, but I forgot which one):
$where .= ” AND post_date_gmt <= ‘$now'”;
(for info, this line should be just after this one:
if ($pagenow != ‘post.php’ && $pagenow != ‘edit.php’ && !($this->is_single && $user_ID)) {Commenting this line will allow your users to see future posts, even in the main page. But you need another modification in order for your users to see future posts in a single mode (i.e. through their permalink).
Find the following if statement and comment it completely:if (!current_user_can(‘edit_post’, $this->posts[0]->ID))
{
$this->posts = array ( );
}(for info, this line is after these ones:
if (mysql2date(‘U’, $this->posts[0]->post_date_gmt) > mysql2date(‘U’, $now)) { //it’s future dated
$this->is_preview = true;)
And with these modifications, everything should work fine for you (at least it does for me!)
Regards,
Cedric
Forum: Fixing WordPress
In reply to: “Random” Sorry, no posts matched your criteria on permalinksSo,
after one week, nobody has a clue about this issue? 🙁 It is quite problematic, and I would have greatly appreciated some help, or at least a direction to look at.
Regards,
Cedric