My $query still shows deleted posts
-
Hi! I made a page which shows a list of posts that belongs to a new post type (named ‘fitxes’) I created. This is the query I use to show the list of posts (fitxes):
SELECT DISTINCT p.post_title, p.post_name, t.name, p.ID FROM wp_posts p, wp_postmeta pm, wp_terms t, wp_term_taxonomy tt, wp_term_relationships tr WHERE p.post_status = 'publish' AND p.post_type = 'fitxes' AND pm.post_id = p.ID AND t.term_id = tt.term_id AND tt.term_taxonomy_id = tr.term_taxonomy_id AND tr.object_id = p.ID
But I have a problem. It is that when I delete a post, it still appears in my list. But it does not appear in the admin page (that is what I want).
What is wrong in my query? Thanks
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘My $query still shows deleted posts’ is closed to new replies.