Post Types
-
Hello guys
I’m using a kinda old version of wordpress I know 3.0.1
And I dunno if this was already changed or not on new version.I can update my project if that was already solved.
What I want is to list all my post types on Posts session on edit.php
But when I go there I see this function:
wp_edit_posts_query()This function gets all my posts listed by post type ‘post’
And if I want to list all my posts types I don’t know how to do it on edit page, since there is no filter I could find to apply that change.I found all sql changes into my files and I know that I can use SQL REGEX to add all post types at once just changing the following SQL:
SELECT * FROM {$wpdb->posts} WHERE post_type = (%s)
to:
SELECT * FROM {$wpdb->posts} WHERE post_type REGEXP ‘(%s)’And change the types to explode one array
$type = Array(“post”,”blog”,”press”);
$post_types = implode(“|”, $array);So the SQL would be like:
SELECT * FROM {$wpdb->posts} WHERE post_type REGEXP ‘(post|blog|press)’That would return all my posts no matter if they are blog type, press type or post type.
So I would like to know… is there a safe way to do it??? or only if I rewrite raw files?
Thanks
The topic ‘Post Types’ is closed to new replies.