Title: scrambled's Replies | WordPress.org

---

# scrambled

  [  ](https://wordpress.org/support/users/scrambled/)

 *   [Profile](https://wordpress.org/support/users/scrambled/)
 *   [Topics Started](https://wordpress.org/support/users/scrambled/topics/)
 *   [Replies Created](https://wordpress.org/support/users/scrambled/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/scrambled/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/scrambled/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/scrambled/engagements/)
 *   [Favorites](https://wordpress.org/support/users/scrambled/favorites/)

 Search replies:

## Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sorting by meta AND category](https://wordpress.org/support/topic/sorting-by-meta-and-category/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years ago](https://wordpress.org/support/topic/sorting-by-meta-and-category/#post-2738244)
 * To clarify, I am confused about how the left joins work.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sorting by meta AND category](https://wordpress.org/support/topic/sorting-by-meta-and-category/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years ago](https://wordpress.org/support/topic/sorting-by-meta-and-category/#post-2738242)
 * So I tried this. I am using a piece of existing code. Is the first section consistent?
   This is my first time ever coding something this complex.
 * I tried to annotate the code below with capital letters.
 * [http://pastebin.com/vJ9sfJym](http://pastebin.com/vJ9sfJym)
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sorting by meta AND category](https://wordpress.org/support/topic/sorting-by-meta-and-category/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years ago](https://wordpress.org/support/topic/sorting-by-meta-and-category/#post-2738199)
 * Do I need all three of those joins to only sort posts in one category?
 *     ```
       LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
       	LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
       	LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
       ```
   
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sorting by meta AND category](https://wordpress.org/support/topic/sorting-by-meta-and-category/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years ago](https://wordpress.org/support/topic/sorting-by-meta-and-category/#post-2738127)
 * We have a custom setup and want to keep it like this. Thought it would be easy
   to just add a category? Can anyone point me in the right direction?
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Sorting by meta AND category](https://wordpress.org/support/topic/sorting-by-meta-and-category/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years ago](https://wordpress.org/support/topic/sorting-by-meta-and-category/#post-2737981)
 * I think I am trying to do this: [http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#Query_by_Category_Name_and_Custom_Field_Key_Sorted_by_Key.27s_Value](http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#Query_by_Category_Name_and_Custom_Field_Key_Sorted_by_Key.27s_Value)
 * But I don’t think that code works with WP 3.3.2. Help?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Frequent spam user registrations](https://wordpress.org/support/topic/frequent-spam-user-registrations/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/frequent-spam-user-registrations/#post-2243493)
 * Any ideas? Help would be *greatly* appreciated.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Is there any way to remove www. prefix from URL?](https://wordpress.org/support/topic/is-there-any-way-to-remove-www-prefix-from-url/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/is-there-any-way-to-remove-www-prefix-from-url/#post-1911450)
 * This appears to be an old plugin. When I activated it, WP logged me out. I activated
   again, and WP logged me out once more. Can anyone confirm this plugin still works?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [More tag not working](https://wordpress.org/support/topic/more-tag-not-working-5/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/more-tag-not-working-5/#post-1571882)
 * thanks
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Attachment page: click thumbnail to navigate images](https://wordpress.org/support/topic/attachment-page-click-thumbnail-to-navigate-images/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/attachment-page-click-thumbnail-to-navigate-images/#post-1544677)
 * It looks like nothing I change (even deleting something like the header code)
   in attachment.php affects the actual image page. Does anything in functions.php
   need to be modified?
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Attachment page: click thumbnail to navigate images](https://wordpress.org/support/topic/attachment-page-click-thumbnail-to-navigate-images/)
 *  Thread Starter [scrambled](https://wordpress.org/support/users/scrambled/)
 * (@scrambled)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/attachment-page-click-thumbnail-to-navigate-images/#post-1544572)
 * Still nothing, unfortunately.
 * Here’s attachment.php:
 *     ```
       <?php get_header() ?>
   
       	<div id="container">
       		<div id="content">
   
       <?php the_post() ?>
   
       			<h3 class="entry-title"><a href="<?php echo get_permalink($post->post_parent) ?>" title="<?php printf( __( 'Return to %s', 'sandbox' ), wp_specialchars( get_the_title($post->post_parent), 1 ) ) ?>" rev="attachment"><?php echo get_the_title($post->post_parent) ?></a></h3>
   
       			<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
       				<h3 class="entry-title"><?php the_title() ?></h3>
       				<div class="entry-content">
       					<div class="entry-attachment"><a href="<?php echo wp_get_attachment_url($post->ID) ?>" title="<?php echo wp_specialchars( get_the_title($post->ID), 1 ) ?>" rel="attachment"><?php echo basename($post->guid) ?></a></div>
       					<div class="entry-caption"><?php if ( !empty($post->post_excerpt) ) the_excerpt() ?></div>
       <?php the_content() ?>
   
       				</div>
   
       <?php previous_image_link(); ?> <?php next_image_link();?>
   
       			</div><!-- .post -->
   
       		</div><!-- #content -->
       	</div><!-- #container -->
   
       <?php get_sidebar() ?>
       <?php get_footer() ?>
       ```
   
 * Any ideas?

Viewing 10 replies - 1 through 10 (of 10 total)