2, ‘limit’ => 11 ) );
echo ‘
- ‘;
- %s(%d)
foreach ( $popular as $p ) {
if ($p[‘post_title’] != “Home page” ){
printf(‘
‘, $p[‘post_permalink’], $p[‘post_title’], $p[‘views’] );
$categories = wp_get_post_categories($p[‘post_id’]);
$cat_count = count($categories);
$categories[$cat_count+1] = 45264;
wp_set_post_categories( $p[‘post_id’], $categories );
}
}
echo ‘
‘;
}
?>