global $post;
$myposts = query_posts('category_name=acties_parent');
$categories_list = array();
$checklist = array();

$p_section = $_GET['section'];

foreach( $myposts as $post ) : setup_postdata($post);
$bla = strip_tags(get_the_category_list( __( ', ', 'twentyeleven' )));
$tempcatlist = str_replace(array('acties_parent', ','), '', $bla);
$categories_list[$tempcatlist][] = get_the_id();
if(!in_array($tempcatlist, $checklist)) {
$checklist[] = $tempcatlist;
}

endforeach;

$counter = 0;

foreach($categories_list as $actie) {
//print_r($actie);
if(!isset($_GET['post_id'])) { $p_post_id = $actie[0]; } else { $p_post_id = $_GET['post_id']; }

if( (isset($_GET['section'])) && ($_GET['section']==$checklist[$counter]) || (!isset($_GET['section'])) ) {
?>

preg_match("([A-z]+ )",$checklist[$counter],$matches);
echo str_replace($matches[0],"“.$matches[0].”“,$checklist[$counter]);
?>

else { $p_post_id = $actie[0]; ?>


$test = get_the_post_thumbnail($p_post_id, array(205, 205));
echo str_replace(array('

‘, ‘

‘), ”, $test);
?>

echo "
“;
$my_post = get_post($p_post_id);
$title = $my_post->post_title;
echo substr($my_post->post_content, 0, 200).”…
Lees Verder“;
echo “

“;
?>