Including the plugin in WP Query
-
I’m having trouble implementing this.
I have it set up in my functions.php file to be hooked into a custom posttype, and I can upload the gallery in the cpt editor. But I can’t seem to get it to work when I query the cpt.
Here’s what I’m trying (or variations on this implementation);
<?php $query = new WP_Query( array( 'post_type' => 'detund_store', 'posts_per_page' => 100, 'orderby' => 'title', 'order' => 'ASC' ) ); while ( $query->have_posts() ) : $query->the_post(); get_post_gallery_ids($post->ID); echo '<li>'; echo wp_get_attachment_url( $id ); echo '<a href="'; the_permalink(); echo '">'; echo $slug = basename(get_permalink()); echo '</a></li>'; endwhile; wp_reset_query(); ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Including the plugin in WP Query’ is closed to new replies.