Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

get_children Change Order in WordPress Theme


(!)

sequoia13's Avatar
sequoia13 sequoia13 is offline
Computer Specs
Junior Member with 8 posts.
THREAD STARTER
 
Join Date: Aug 2007
Experience: Intermediate
15-Aug-2011, 05:06 PM #1
get_children Change Order in WordPress Theme
I'm pretty sure this is a problem unique to the theme of the website so that's why I'm starting a new thread.

I need to change the order of the houses under "Premier Rentals" at this domain: http://www.joshuadesertretreats.com .

It's a Wordpress.org site and I'm not sure how to assign priority to each so that they display in a different order but I'm sure it's related to the red text below.

Here is the php code from the theme:

Code:
<?php block_start('scroller'); ?>
	<h2 class="title">Premiere Rentals</h2>
	<div class="container"><ul class="properties">
	<?php $properties = get_children('post_parent=6&post_type=page&post_status=publish&orderby=menu_order&order=ASC'); foreach($properties as $property) { $id=$property->ID; $link=get_permalink($id); $title=$property->post_title; $content=$property->post_content; $image = get_the_image('thumbnail',1,$id); if($image) { ?>
		<li class="property">
			<h3 class="name"><a href="<?php echo $link; ?>"><?php echo $title; ?></a></h3>
			<a href="<?php echo $link; ?>"><img src="<?php echo $image; ?>" alt="" /></a>
			<?php if(get_post_meta($id,'max-guests',true)) echo '			<p class="max-guests">Sleeps up to '.get_post_meta($id,'max-guests',true).'</p>' . "\n"; ?>
			<p class="blurb"><?php if(get_post_meta($id,'blurb',true)) the_blurb(get_post_meta($id,'blurb',true)); else the_blurb($content); ?></p>
		</li>
	<?php } } ?>
	</ul></div>
	<a href="javascript:void(0);" class="next"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/next.png" alt="Next" /></a>
	<a href="javascript:void(0);" class="prev"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/prev.png" alt="Previous" /></a>
	<br class="clear" />
<?php block_end(); ?>
Does anyone see any thing that I'm missing? Thanks for your help.
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
15-Aug-2011, 07:32 PM #2
It appears the images are loaded in numerical order, from banner1 to banner6. If you can't find the parameter to pass to request a descending sort order of the images, maybe you could simply change the image names so the images are named in the order you want them displayed.

Peace...
sequoia13's Avatar
sequoia13 sequoia13 is offline
Computer Specs
Junior Member with 8 posts.
THREAD STARTER
 
Join Date: Aug 2007
Experience: Intermediate
15-Aug-2011, 07:43 PM #3
Thanks for your reply tomdkat. The banner images are for the slideshow towards the top of the page. I need to rearrange the links/houses under "Premier Rentals" below the slideshow. Each one consists of the image, link, max guests, and blurb. Are there different values for "publish&orderby=" ?
tomdkat's Avatar
Computer Specs
Trusted Advisor with 7,141 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
15-Aug-2011, 07:54 PM #4
Try changing the order from "ASC" (ascending) to "DESC" (descending). That would reverse the order. If you wanted to mix them up and put them in a particular order, that would probably take some work OR you would have to order the posts, the "children" properly.

You can read about the parameters to get_children here.

Peace...
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
php, theme, wordpress

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑