lloydarmbrust-1
Forum Replies Created
-
Forum: Themes and Templates
In reply to: untheme-two-column….how toHey myidcw. Looks like you got the image top to work. To ask questions, please go to and post: http://itscalledwebdesign.com/theme/untheme-two-column/
This way I can track everything better. WP doesn’t notify authors when they get questions.
Also, most of the questions you asked are answered on that page.
Forum: Themes and Templates
In reply to: comments not working on pagesSorry, just saw this. Do you have a link? That’s weird, because I know other blogs are using this and the comments work. Check out: http://singlenotescale.com/2008/12/the-future-of-this-site/#comments
In the future, comment on my website, here: http://itscalledwebdesign.com/theme/parchment/
That way I can track problems and requests and respond accordingly. Thanks!
Forum: Plugins
In reply to: Show related posts with excerpt and key/valueHey Kafkaesqui, This some really good code. In fact, I have been trying to modify several plugins (like YARPP) for about 50 hours now and this is the perfect solution.
The only problem is that I really don’t want it to be limited by the existence of the custom field key. I am using the Post Thumbs plugin, which is perfect for getting the image to display, so the custom field would just add to much complication to adding a new post.
Okay, so I think the problem I’m having is in this bit of code:
$rand_tag_posts = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts INNER JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id) INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) INNER JOIN $wpdb->terms ON ($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) WHERE $wpdb->term_taxonomy.taxonomy = 'post_tag' AND $wpdb->terms.name IN ($tags) AND $wpdb->postmeta.meta_key = 'img' AND post_type = 'post' AND (post_status = 'publish') AND $wpdb->posts.ID <> $post->ID GROUP BY $wpdb->posts.ID ORDER BY RAND() LIMIT $limit");With a lot of trial and error, I actually got my posts to display when I cut it down to the following:
$rand_tag_posts = $wpdb->get_results("SELECT $wpdb->posts.* FROM $wpdb->posts INNER JOIN $wpdb->term_relationships ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id) INNER JOIN $wpdb->term_taxonomy ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) INNER JOIN $wpdb->terms ON ($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id) WHERE $wpdb->term_taxonomy.taxonomy = 'post_tag' AND post_type = 'post' AND (post_status = 'publish') AND $wpdb->posts.ID <> $post->ID GROUP BY $wpdb->posts.ID ORDER BY RAND() LIMIT $limit");But now it doesn’t pull related tags. It just randomly shows two posts regardless of what the tags say.
I would really appreciate any help you could offer, as I have literally been pulling my hair out on this one.