Hello,
thank you for the great theme. I like to ad a list of all projects of my portfolio with the categories. Something like that:
Hamburg
• Parlament Restaurant
• Fischereihafen Restaurant-Majestätsbeleidigung?
• Lizzy hätt`s fast verpennt
GESUNDHEIT
• Cannabis
• Männerschnupfen
Allgemein
• GLÜCK MACHT DÜCK
• METOO – Hilten/Hollywood
• Reeperbahn – in Öl
How can I realise it? Each time I like to create this, my list shows only posts (blog) with that categories.
Thanks and regards
Silva
The code I use now:
<?php
//for each category, show all posts
$cat_args=array(
'orderby' => 'name',
'order' => 'ASC'
);
$categories=get_categories($cat_args);
foreach($categories as $category) {
$args=array(
'showposts' => -1,
'category__in' => array($category->term_id),
'caller_get_posts'=>1
);
$posts=get_posts($args);
if ($posts) {
echo 'Kategorie: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a>
';
foreach($posts as $post) {
setup_postdata($post); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
<?php
} // foreach($posts
} // if ($posts
} // foreach($categories
?>