WordPress.org

Ready to get started?Download WordPress

Forums

[Theme Framed redux] Show only a specific image gallery (1 post)

  1. Lagoneroseppia
    Member
    Posted 1 year ago #

    Hello,

    I have a WP theme that permits user to create photo galleries and insert in a number of images.

    My trouble it's I want to show in a page all images in gallery taxonomy (so, all images present in all galleries) except for those present in two, specific gallery I've created.

    How can do this? Currently, I use the following query to select all images:

    <?php
    $loop = new WP_Query
    (
    array
    (
    'post_type' => 'photos',
    'posts_per_page' => -1,
    ));
    ?>
    
    <?php
    while ( $loop->have_posts() ) : $loop->the_post();
    $terms = get_the_terms( get_the_ID(), 'gallery' );
    ?>

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic