php - WHERE NOT Query in Wordpress -


i querying database using following code , working fine

<?php query_posts(   'post_type=gallery&posts_per_page='.$gnum.'&paged='.$paged.'&orderby=title&order=asc'   ); ?> 

could please tell me how add not above query.

(where id != '400' , id!='401')

in wordpress query post add argument post__not_in.

'post__not_in' => array(400, 401)  $args = array(      'post_type' => 'gallery',      'posts_per_page' => $gnum,      'post__not_in' => array(400, 401),      'paged' => $paged,      'orderby' => 'title',      'order' => 'asc' ); 

so query post like,

query_posts($args); 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -