Support » Plugin: Shortcode Exec PHP » Simple Index page organised by category.

  • Thanks to the developer for the php wizardry – very nice.

    Here’s a bit of code I wrote which was really easy to implement with this plugin. Will donate, when I get paid.

    $categories = get_categories();
    
    foreach($categories as $category){
    
    	echo '<h3>' , $category->name , '</h3>';
    
    	$posts = get_posts(array('category' => $category->cat_ID, 'order'=> 'ASC', 'orderby' => 'title', 'numberposts' => -1));
    
    	echo '<ul>';
    
    	foreach($posts as $post) {
    		echo '<li><a href="' , get_permalink( $post->ID ) , '">' , $post->post_title , '</a></li>';
    	}
    
    	echo '</ul>';
    }

    http://wordpress.org/extend/plugins/shortcode-exec-php/

  • The topic ‘Simple Index page organised by category.’ is closed to new replies.