Created
March 31, 2014 16:37
-
-
Save anonymous/9896420 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
function yoga_content( $atts, $content = null ) { | |
// $args = array( | |
// 'post_type' => 'page', | |
// 'perm' => '12 poses group', | |
// 'order' => 'ASC', | |
// 'orderby' => 'title', | |
// 'posts_per_page' => -1 | |
// ); | |
echo "<h2>Available Content</h2>"; | |
$exclude_ids = array( 3240,2600,2612,2610 ); | |
$the_query = new WP_Query(array( 'post_type' => 'page', 'perm' => 'member_content_access', array( 'post__not_in' => $exclude_ids ) )); | |
if(current_user_can( 'member_content_access' ) ) : | |
while($the_query->have_posts()) : | |
$the_query->the_post(); | |
?> | |
<ul class="display-posts-listing"> | |
<li class="listing-item"><a href="<?php echo get_permalink( ); ?>" title="<?php the_title() ?>"><?php the_title() ?></a></li> | |
</ul> | |
<?php | |
endwhile; | |
else: | |
?> | |
<?php | |
endif; | |
// Reset Post Data | |
wp_reset_postdata(); | |
} | |
add_shortcode("yoga_content", "yoga_content"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment