Order by coustom field
-
Hello,
I will like to order a post results by custim field,
That’s the idea
< ?php if (have_posts()) : query_posts($query_string ."cat=-1,-53,-48-54&posts_per_page=55&orderby='tipo'&orderby='floor'&order=ASC"); ? >
Where floor is a custom field,
So I tried this way,
< ?php if (have_posts()) : query_posts($query_string ."cat=-1,-53,-48-54&posts_per_page=55&orderby='".get_post_meta($post- >ID, 'floor', true)."'&order=ASC"); ? >
and dosn’t works,
Now I have tried something like this,
$post = $wp_query->post;query_posts("'meta_key=fllor&cat=89,-54,-48,-53&orderby=meta_value&order=ASC;")
Anybody knows how t do that?
thanks,
best regards
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Order by coustom field’ is closed to new replies.