Title: shellfish's Replies | WordPress.org

---

# shellfish

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Orderby custom field contents](https://wordpress.org/support/topic/orderby-custom-field-contents/)
 *  Thread Starter [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/orderby-custom-field-contents/#post-1904584)
 * Ok – At last I’ve worked it out thanks to you and a bit of goggling!
 * I did a combination of your code and using the wp smart sort to sort numerically
   by custom field [lot_number]
 * In case this helps anyone else:
 *     ```
       <?php
   
       if (!$paged = get_query_var('paged')) {
          if (!$paged = get_query_var('page')) {
             $paged = 1;
          }
       }
       $args = array(
          'cat' => 3,
          'paged' => $paged,
       );
       query_posts($args);
   
       ?>
   
       <!-- Start the Loop. -->
   
       <?php
   
        if (have_posts()) : 
   
       ?>
   
       		<?php
   
        while (have_posts()) : the_post(); 
   
       ?>
   
       	<?php $lotnum = get_post_meta($post->ID, 'lot_number', true); ?>
   
       			<?php the_title(); ?>
   
       				<div class="entry">
       					<?php the_content(); ?>
       <li><em>Lot Number:</em> <?php echo $lotnum; ?></li>
   
       				</div>
   
       			</div>
   
       		<?php endwhile; ?>
   
       <?php if(function_exists('wp_paginate')) {
           wp_paginate();
       } ?>
   
       	<?php else : ?>
   
       		<h2 class="center">Not Found</h2>
       		<p class="center">Sorry, but you are looking for something that isn't here.</p>
       		<?php get_search_form(); ?>
   
       	<?php endif; ?>
       ```
   
 * [note – i’ve taken out the other custom fields for now]
 * Thanks for your help.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Orderby custom field contents](https://wordpress.org/support/topic/orderby-custom-field-contents/)
 *  Thread Starter [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/orderby-custom-field-contents/#post-1904583)
 * Hey,
 * I’m using version 2.9.1. I’m still seeing the published order.
 * Thanks
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Orderby custom field contents](https://wordpress.org/support/topic/orderby-custom-field-contents/)
 *  Thread Starter [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/orderby-custom-field-contents/#post-1904529)
 * Hey,
    Thanks for response. Tried the code and must be doing something wrong as
   still doesn’t sort them in the right order. My code now looks like this:
 *     ```
       <!-- Start the Loop. -->
       <?php
       if (!$paged = get_query_var('paged')) {
          if (!$paged = get_query_var('page')) {
             $paged = 1;
          }
       }
       $args = array(
          'cat' => 3,
          'meta_key' => 'lot_number',
          'orderby' => 'meta_value_num',
          'paged' => $paged,
       );
       query_posts($args);
       ?>
       <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
   
       // set up variables to hold custom field entries.
       $subtitle = get_post_meta($post->ID, 'subtitle', true);
       $lotnum = get_post_meta($post->ID, 'lot_number', true);
       $description = get_post_meta($post->ID, 'description', true);
       $estimate = get_post_meta($post->ID, 'estimate', true);
        $auctiondate = get_post_meta($post->ID, 'auction_date', true);
       $image = get_post_meta($post->ID, 'image', true);
   
       ?>
   
        <!-- Display the Post's Content in a div box. -->
   
       <div class="product-box">
       <ul>
   
       <li class="title">Title: <?php the_title();?></li>
       <li class="subtitle"><em>Subtitle:</em> <?php echo $subtitle; ?></li>
   
       <!-- Display our Custom Field -->
       <li><em>Lot Number:</em> <?php echo $lotnum; ?></li>
       <li><em>Description:</em> <?php echo $description; ?></li>
       <li><em>Guide Price:</em> <?php echo $estimate; ?>  </li>
       <li><em>Auction Date:</em> <?php echo $auctiondate; ?></li>
       <li><?php echo $image; ?></li>
       <li class="galleryset"><?php the_content();?></li>
       </ul>
       </div> <!-- /product box --><br/>
        <!-- Stop The Loop (but note the "else:" - see next line). -->
        <?php endwhile; else: ?>
   
        <!-- The very first "if" tested to see if there were any Posts to -->
        <!-- display.  This "else" part tells what do if there weren't any. -->
        <p>Our next auction catalogue will be published here shortly - please visit again soon</p>
       ```
   
 * Any ideas?
    Thanks :0)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Help! Widgets don’t work!!!](https://wordpress.org/support/topic/help-widgets-dont-work/)
 *  [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/help-widgets-dont-work/#post-618171)
 * Hey,
 * On the dashboard > Presentation > Widgets is it showing any widgets assigned 
   to the page?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [From Localhost to ISP](https://wordpress.org/support/topic/from-localhost-to-isp/)
 *  Thread Starter [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/from-localhost-to-isp/#post-672560)
 * That makes sense…thanks for the link!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Increase message box size possible?](https://wordpress.org/support/topic/increase-message-box-size-possible/)
 *  [shellfish](https://wordpress.org/support/users/shellfish/)
 * (@shellfish)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/increase-message-box-size-possible/#post-672554)
 * Hey,
    Have you tried specifying the size through the CSS file?. If you looked
   at the markup the form should have a class or ID name that can be targetted through
   CSS.
 * Good luck

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