Die Änderung mittels query_posts() muss bei K2 auf jeden Fall in die theloop.php. Nur wo genau kann ich dir auch nicht sagen. Ich würde sagen hier:
PHP
<?php
// This is the loop, which fetches entries from your database.
// It is a very delicate piece of machinery. Be gentle!
// Get core WP functions when loaded dynamically
if ( isset($_GET['k2dynamic']) ):
// Check for CGI Mode
if ( 'cgi' == substr( php_sapi_name(), 0, 3 ) ):
require_once( preg_replace( '/wp-content.*/', '', __FILE__ ) . 'wp-config.php' );
else:
require_once( preg_replace( '/wp-content.*/', '', $_SERVER['SCRIPT_FILENAME'] ) . 'wp-config.php' );
endif;
if ( $_GET['k2dynamic'] != 'init' ):
// Send the header
header('Content-Type: ' . get_bloginfo('html_type') . '; charset=' . get_bloginfo('charset'));
// K2 Hook
do_action('k2_dynamic_content');
// Initialize the Loop
query_posts( $_GET [COLOR="Red"]. '&orderby=title&order=asc'[/COLOR]);
endif;
?>
<div id="dynamictype" class="<?php k2_body_class(); ?>">
<?php endif;
// Debugging
if ( isset($_GET['k2debug']) ):
echo '<div class="alert">';
echo '<b>SQL:</b><br />'; var_dump($wp_query->request);
echo '<b>Query:</b><br />'; var_dump($wp_query->query);
echo '</div>';
endif;
Alles anzeigen
Wenns nur für 1 Kategorie ist o.ä. Bedingungen greifen sollen, dann kannst du sicher mit Conditional Comments arbeiten.
Ich weiß nur nicht ob die if-Bedingung im Normalfall immer wahr ist. Aber hier helfen vielleicht wieder ein paar Debugausgaben. ;-)