Hi !
I tried adding
query_posts($query_string . '&meta_key=sortdate&orderby=meta_value&order=asc' );
to index-loop.php.
It sorted my Posts by sortdate fine but after that i can't open anypostings.
Hi !
I tried adding
query_posts($query_string . '&meta_key=sortdate&orderby=meta_value&order=asc' );
to index-loop.php.
It sorted my Posts by sortdate fine but after that i can't open anypostings.
Hi MaxMill,
Did you replace the initial query at the top of the file just below the avia config or did you just add it before the loop?
Regards,
Devin
Hi Devin, i just added it before the loop:
<?php
global $avia_config;
if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }
$loopcounter = 1;
query_posts($query_string . '&meta_key=sortdate&orderby=meta_value&order=asc' );
// check if we got posts to display:
if (have_posts()) :
You need to add your custom query parameters to the $avia_config['new_query'] array. Replace:
replace:
if(isset($avia_config['new_query'])) { query_posts($avia_config['new_query']); }
with:
if(isset($avia_config['new_query'])) {
$avia_config['new_query']['meta_key'] = "sortdate";
$avia_config['new_query']['orderby'] = "meta_value";
$avia_config['new_query']['order'] = ASC;
query_posts($avia_config['new_query']);
}You must log in to post.