• Resolved nachte

    (@nachte)


    I’m trying to create portofolio layouts that are based on categories i set with the Enhanced Media Library plugin. I’ve made a custom query that i entered in the post based content source option.

    This does load my images, and they show up in the layout. However, when i click on them, i get a black lightbox, but no image.

    $args = array(
    ‘post_type’ => ‘attachment’,
    ‘post_mime_type’ =>’image’,
    ‘post_status’ => ‘inherit’,
    ‘posts_per_page’ => -1,
    ‘tax_query’ => array(
    array(
    ‘taxonomy’ => ‘media_category’,
    ‘field’ => ‘slug’,
    ‘terms’ => ‘featured’
    )
    )
    );

    this translates into: post_type=attachment&post_mime_type=image&post_status=inherit&posts_per_page=-1&tax_query[0][taxonomy]=media_category&tax_query[0][field]=slug&tax_query[0][terms]=featured

    I do see that the links on the gallery here are of the form:
    https://127.0.0.1/wordpress/_ame5898/
    while those from other image content source based ones are of the form:
    https://127.0.0.1/wordpress/wp-content/uploads/2019/01/AME4750-1280×1920.jpg

    any suggestions to what i’m doing wrong?

    Thanks!!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom query images not displaying in lightbox’ is closed to new replies.