Hi! Some of the same posts show up in the grid and the slider too at the same time. And two posts are removed from the "featured to slider" but they still show up... why?
I believe this is rather a database issue rather than the query. I'd suggest to untick the slider checkbox to the selected posts, delete them and re-create them as new with a copy paste, then feature them again. Running a database cleaning tool/plugin also might help.
By the way the slider query can be found in partials/part-sliders.php , while the grid is located in partials/part-grid.php
Thank you :) For some reason it couldn't order the posts properly by date, I've changed it to ID. Now it works properly
slider:
SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'mgm_featured_post_1' AND wpostmeta.meta_value = '1' AND wposts.post_status = 'publish' AND wposts.post_type IN ('post', 'page') ORDER BY wposts.ID DESC
grid:
SELECT wposts.* FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = 'mgm_featured_post_1' AND wpostmeta.meta_value = '1' AND wposts.post_status = 'publish' AND wposts.post_type IN ('post', 'page') ORDER BY wposts.ID DESC LIMIT 3,3
Hi!
Some of the same posts show up in the grid and the slider too at the same time. And two posts are removed from the "featured to slider" but they still show up... why?
Or atleast just tell me where is the slider query please. I want to fix it
Hi there,
I believe this is rather a database issue rather than the query. I'd suggest to untick the slider checkbox to the selected posts, delete them and re-create them as new with a copy paste, then feature them again. Running a database cleaning tool/plugin also might help.
By the way the slider query can be found in partials/part-sliders.php , while the grid is located in partials/part-grid.php
More info about how the grid should work.
Hope it helps
Regards
djwd
Regards
djwd
Thank you :) For some reason it couldn't order the posts properly by date, I've changed it to ID. Now it works properly
slider:
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'mgm_featured_post_1'
AND wpostmeta.meta_value = '1'
AND wposts.post_status = 'publish'
AND wposts.post_type IN ('post', 'page')
ORDER BY wposts.ID DESC
grid:
SELECT wposts.*
FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta
WHERE wposts.ID = wpostmeta.post_id
AND wpostmeta.meta_key = 'mgm_featured_post_1'
AND wpostmeta.meta_value = '1'
AND wposts.post_status = 'publish'
AND wposts.post_type IN ('post', 'page')
ORDER BY wposts.ID DESC
LIMIT 3,3