Timeline for Taxonomy archive + query attachments = duplicate results
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 7, 2014 at 20:21 | comment | added | Bibiana | Chip! I got it! :D I made something like these! wordpress.stackexchange.com/questions/29635/… Thanks a lot! :) | |
Apr 7, 2014 at 19:37 | comment | added | Bibiana | If you could take a look at these: wordpress.org/support/topic/… It works fine! But has an error right behind the attachments that I want: Fatal error: Call to a member function have_posts() on a non-object in... The result here: colorbits.com.br/t-arte/sakimi-chan | |
Apr 7, 2014 at 19:35 | comment | added | Chip Bennett |
My code was just example code. You'll need to adapt it as necessary (such as adding your tax_query ).
|
|
Apr 7, 2014 at 19:25 | comment | added | Bibiana |
I've tried it, but now its showing some random images that aren't related to the taxonomy term '$term_id' :/ $media_query = get_posts($args); if( !empty( $media_query ) ) : foreach ( $media_query as $media ) : global $post; $post = $media_query; setup_postdata($media_query); And attachments query as you shown.
|
|
Apr 7, 2014 at 19:10 | history | answered | Chip Bennett | CC BY-SA 3.0 |