Custom Post Query (displaying custom results)


Posted on Sunday, July 31st, 2011


Hi All

For anyone that wants to display their own custom search results within different areas of their website the code is as follows;

$GLOBALS['limitSearch'] = 12; <-- how many results to show
$GLOBALS['galleryblockstop']=3; <-- how many columns
$GLOBALS['query_string_new'] = "cat=27"; <-- see http://codex.wordpress.org/Function_Reference/query_posts

then display the results using

 echo $PPTDesign->GALLERYBLOCK();

  1. comment says:
    Posted July 31, 2011 at 3:45 pm | Permalink

    thank for your hint that lead to this solution
    thanks
    JAmes

  2. comment says:
    Posted January 11, 2012 at 9:41 pm | Permalink

    This is excellent, thank you very much :)