Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Kolsyra on "Add a specific post category to a specific page"

$
0
0

Hi,

I am pretty new to code php but after a few hours of google searching I
found that I could use this code to have a page pick up posts for a specific category:

if( is_page( 'kolsyra' ) {
   query_posts( array( 'category_name' => 'kolsyra' ) );
}

just before the loop in the page.php file but I don't get it to work.
any help on this would be much appriciated.

I have tried to put the code within its own <?php and ?> tags just above the loop and inside those tags for the loop itself just before the loop starts.

/Kolsyra


Viewing all articles
Browse latest Browse all 8245

Trending Articles