Timeline for WP_Query: Posts within category OR custom post type
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
|
|
Sep 8, 2014 at 5:55 | vote | accept | Vinicius Tavares | ||
Sep 8, 2014 at 5:54 | comment | added | Vinicius Tavares | I've finally solved this by using a major part of your answer. I've added for the listas-2 category a post_meta called _is_lh_lista and did that for the custom post type too. Now I can query by meta key and value and works like a charm. Thanks for giving the idea! | |
Aug 30, 2014 at 4:16 | comment | added | Pieter Goosen | Then why don't you assign the default categories to your custom post type and then assign the custom post type posts to your desired category. This is the only way that I can see to keep your custom query down to one, otherwise you'll need to run two custom queries, and merge them, and as you said, it becomes a mess if you add pagination to the equation | |
Aug 29, 2014 at 18:14 | comment | added | Vinicius Tavares | Hi Pieter! That's what I thought at the first place, but then I realized that I can't do this because these older type of posts have permalinks linked to facebook likes & comments, and doing this migration would make them all disappear. | |
Aug 29, 2014 at 10:09 | history | answered | Pieter Goosen | CC BY-SA 3.0 |