Last active
August 29, 2015 13:56
-
-
Save tenman/9341614 to your computer and use it in GitHub Desktop.
Raindrops template shows category name and post links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Template Name: test | |
*/ | |
get_header('html5'); | |
?><div style="margin:5%;-moz-columns: 15em auto;-webkit-columns:15em auto;-o-columns: 15em auto;-ms-columns: 15em auto;"> | |
<?php | |
$categories = get_all_category_ids(); | |
$output = ''; | |
if($categories){ | |
foreach($categories as $cat_id) { | |
$cat_name = get_cat_name($cat_id); | |
echo '<h2>'.$cat_name.'</h2>'; | |
echo do_shortcode('[catlist name='.$cat_name.']'); | |
} | |
} | |
?></div> | |
<?php | |
get_footer(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[catlist name='.$cat_id.'] is wrong
[catlist name='.$cat_name.'] correct