WP_Query for attachments without duplicating post_parent and displaying tagged image

After giving it another look with some fresh eyes, I decided to add a third loop within Loop 2 and not have it working as desired: $media_args = array( ‘post_type’ => ‘attachment’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘products’, ‘field’ => ‘term_id’, ‘terms’ => $product_tag ) ) ); // Loop 1 – … Read more

How to link images to attachment.php [duplicate]

I am not sure what you mean by “redirect” there. attachment.php is meant to be used as theme template file. Loading it directly it won’t be able to access WordPress core properly. In usual WordPress mechanics you can use get_attachment_link() to form URL itself or wp_get_attachment_link() for whole link HTML.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)