Tag Info

Hot answers tagged

2

As stated in a comment, your get_posts parameters are wrong. There is no such parameter as term_id. You should make use tag which uses the tag slugs as a string or tag__in which uses the tag ids in an array This will work $posts = get_posts('numberposts=6&tag='. $tags->slug); or this will work $posts = get_posts('numberposts=6&tag__in=' . ...


1

Working off the assumption that you're already on Post One, and want to add Post Two below it, as a "Related Posts" type feature, you can use a standard WordPress function to get an array of One's tags, then do a query to grab and display posts with tags that match. //get just the IDs of Post One's tags $tag_ids = wp_get_post_tags($post->ID, ...


1

I'm not in the position to code right now, but here is an idea A thousand posts is quite a lot, but it is even more if you are retrieving all posts from the db in one go. What if you have ten thousand posts, of which only ten or twenty is not tagged after the whole retagging operation. This can become such a huge query that you run the danger of timing out ...



Only top voted, non community-wiki answers of a minimum length are eligible