shellfish
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Orderby custom field contentsOk – 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
In reply to: Orderby custom field contentsHey,
I’m using version 2.9.1. I’m still seeing the published order.
Thanks
Forum: Fixing WordPress
In reply to: Orderby custom field contentsHey,
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
In reply to: Help! Widgets don’t work!!!Hey,
On the dashboard > Presentation > Widgets is it showing any widgets assigned to the page?
Forum: Fixing WordPress
In reply to: From Localhost to ISPThat makes sense…thanks for the link!
Forum: Fixing WordPress
In reply to: Increase message box size possible?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