Sorting Portfolio in acending order

Currently my portfolio is sorting by post date and I am trying to get it to sort by alphabetical/acending order. I can not get a response from the developer so any help would be greatly appreciated. Here is my code:
[php]

<?php /** * @package WordPress * @subpackage QualiFire */ /** * Template Name: Portfolio page */ get_header(); global $post; // get the page id outside the loop (check if WPML plugin is installed and use the WPML way of getting the page ID in the current language) $page_id = ( function_exists('icl_object_id') && function_exists('icl_get_default_language') ) ? icl_object_id($post->ID, 'page', true, icl_get_default_language()) : $post->ID; $portfolio_cat_ID = $qualifire_options['portfolio_cat_for_page_'.$page_id]; // Get the portfolio category specified by the user in the 'QualiFire Options' page $current_categoryID = $_GET['cat']; $categories = get_categories( 'child_of='.$portfolio_cat_ID ); $query_string_prefix = ( get_option('permalink_structure') != '' ) ? '?' : '&'; $portfolio_items_per_page = $qualifire_options['portfolio_items_per_page_for_page_'.$page_id]; $portfolio_title_posistion = $qualifire_options['portfolio_title_posistion']; ?>
<?php // Check if a category has been assigned as Portfolio section if( $portfolio_cat_ID ) : ?>
  <div class="thumbsWrapper">
<?php if ( $categories ) : ?>
    <div id="categoryLinks" class="grid_22">
	<ul>
	    <li><?php esc_html_e('Categories', 'qualifire'); ?>: &nbsp;&nbsp;&nbsp;</li>
<?php // Generate the link to "All" categories: if ( $current_categoryID ) : ?>
		<li><a href="<?php echo the_permalink(); ?>"><?php esc_html_e('All', 'qualifire'); ?></a></li>
<?php else : ?>
		<li><a href="<?php echo the_permalink(); ?>" class="current"><?php esc_html_e('All', 'qualifire'); ?></a></li>
<?php endif; // Generate the link to the rest of categories: foreach( $categories as $category ) : if ( $current_categoryID == $category->cat_ID ) : ?>
		    <li><a href="<?php echo the_permalink().$query_string_prefix.'cat='.$category->cat_ID; ?>" class="current"><?php echo $category->cat_name; ?></a></li>
<?php else : ?>
		    <li><a href="<?php echo the_permalink().$query_string_prefix.'cat='.$category->cat_ID; ?>"><?php echo $category->cat_name; ?></a></li>
<?php endif; ?> <?php endforeach; ?>
	</ul>
    </div><!-- end categoryLinks -->
<?php endif; ?> <?php if ( !$current_categoryID ) $current_categoryID = $portfolio_cat_ID; //adhere to paging rules if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { // applies when this page template is used as a static homepage in WP3+ $paged = get_query_var('page'); } else { $paged = 1; } // Switch the focus to the chosen portfolio category and its subcategories query_posts( array( 'cat' => $current_categoryID, 'posts_per_page' => $portfolio_items_per_page, 'paged' => $paged ) ); $counter = 1; // loop if (have_posts()) : while (have_posts()) : the_post(); ?>
      <div class="portfolioItemWrapper">
<?php if( $portfolio_title_posistion == 'above' ): ?>
		<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php endif; ?>
	   <div class="thumbHolder pngfix">
	    <div class="portfolioImgThumb">
<?php $thumb_url = get_post_meta($post->ID, 'thumbURL', true); $large_image_url = get_post_meta($post->ID, 'largeImageURL', true); // Grab the preview image from the custom field 'largeImageURL', if set. $item_description = get_post_meta($post->ID, 'itemDescription', true); if ( !$large_image_url ) { // Check if an image is found in the post and assign it as the large preview image. if ( function_exists('get_image_url') && findImage() ) { $large_image_url = get_image_url(); } } if( $thumb_url ) { // thumbnail is provided if ( $large_image_url ) { // if preview image is available, go ahead an link it to the thumbnail. echo ' '; echo ''.get_the_title().''; } else { // if preview image is NOT available, generate a thumbnail without a link echo ' '; echo ''.esc_attr__('Preview image not available!.', 'qualifire').''; } } elseif ( $large_image_url ) { // auto generate thumbnails echo ' '; echo ''.get_the_title().''; } /* Display default image else { echo 'Default Image'; } */ ?>
	    </div><!-- end portfolioImgThumb -->
	   </div><!-- end thumbHolder -->
<?php if ( $item_description ) : ?> <?php if( $portfolio_title_posistion == 'below' ): ?>
		<h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php endif; ?>
	    <div class="clear"></div>
<?php _e($item_description); ?> <?php esc_html_e('Read more...', 'qualifire'); ?> <?php endif; ?>
      </div><!-- end portfolioItemWrapper -->
<?php if ( $counter++ == 3 ) { echo "
"; $counter = 1; } ?> <?php endwhile; ?>
    <div id="paginationPortfolio" class="grid_21 prefix_1">
<?php //Pagination include('scripts/pagination/wp-pagenavi.php'); if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    </div>
<?php endif; //Reset Query wp_reset_query(); ?>
  </div>
<?php else : ?>
<div class="grid_22 prefix_1 suffix_1">
    <h2><?php esc_html_e('Portfolio section for this page has not been found!', 'qualifire'); ?></h2>
    <p><?php _e("<strong>Reason:</strong> No category has been assigned as Portfolio section for this page yet. In order to fix this, go to the theme's options page and assign a category for this page.", 'qualifire'); ?></p>
</div>
<?php endif; ?> <?php // BEGIN the actual page content here... ?>
<div id="main-content" class="grid_21 prefix_1">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="post" id="post-<?php the_ID(); ?>">
<?php if ( get_the_content() ) : ?>
	    <div class="entry">
<?php the_content(__('

Read the rest of this page »

', 'qualifire')); wp_link_pages(array('before' => '

Pages: ', 'after' => '

', 'next_or_number' => 'number')); ?>
	    </div>
<?php endif; ?>
    </div>
<?php endwhile; endif; ?>
<div class="clear"></div>
<?php edit_post_link(esc_html__('Edit this entry.', 'qualifire'), '

', '

'); ?>
</div><!-- end main-content -->
<?php get_footer(); [/php]

I believe this is the snippet to use before the loop…
[php]

<?php query_posts ( $query_string . '&orderby=title&order=ASC' ) ; ?>

[/php]

Just not sure how to properly insert it… :frowning:

Got it! This is my resolution for the heck of it…

[php]
query_posts( array(
‘cat’ => $current_categoryID,
‘posts_per_page’ => $portfolio_items_per_page,
‘orderby’ => ‘title’,
‘order’ => ‘ASC’,
‘paged’ => $paged
)
);
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service