Project

General

Profile

Bug #8870 » jadt.diff

Boone Gorges, 2017-10-30 11:21 AM

View differences:

wp-content/themes/JADT/functions.php
440 440
	return $output;
441 441
} //end custom_wp_link_pages
442 442

  
443
function childtheme_override_category_loop() {
444
	global $wp_query;
445
	
446
	$args = array_merge( $wp_query->query_vars, array( 	
447
		'meta_key' => 'issue-order',
448
	  	'orderby' => 'meta_value',
449
		'order'		=> 'ASC', ) 
450
		);
451
	
452
	query_posts( $args );
453
	
454
	while ( have_posts() ) : the_post(); 
455

  
456
			// action hook for insterting content above #post
457
			thematic_abovepost();
458
			?>
459

  
460
			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?> > 
461

  
462
			<?php
463

  
464
            	// creating the post header
465
            	thematic_postheader();
466
            ?>
467
    			
468
				<div class="entry-content"> 		
469
										
470
					<?php thematic_content(); ?>
471

  
472
				</div><!-- .entry-content -->
473
				
474
				<?php thematic_postfooter(); ?>
475
				
476
			</div><!-- #post -->
477

  
478
		<?php 
479
			// action hook for insterting content below #post
480
			thematic_belowpost();
481
	
482
	endwhile;
483
} // end childtheme_override_category_loop
484

  
485 443
function childtheme_override_page_title() {
486 444

  
487 445
/**
......
561 519
	echo apply_filters('thematic_page_title', $content);
562 520
}
563 521

  
522
add_action( 'pre_get_posts', function( $query ) {
523
	if ( ! $query->is_category() ) {
524
		return;
525
	}
526

  
527
	$tq = $query->set( 'meta_key', 'issue-order' );
528
	$tq = $query->set( 'orderby', 'meta_value' );
529
} );
    (1-1/1)