Created
December 11, 2014 20:12
-
-
Save bearded-avenger/998880369691b54bf220 to your computer and use it in GitHub Desktop.
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
add_shortcode('ideas','ideas_shortcode'); | |
function ideas_shortcode(){ | |
ob_start(); | |
$args = array( | |
'post_type' => 'ideas', | |
'posts_per_page' => -1 | |
); | |
$q = new WP_Query($args); | |
if($q->have_posts()) : while($q->have_posts()) : $q->the_post(); | |
echo the_title('<h6>','</h6>'); | |
endwhile;endif; | |
return ob_get_clean(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment