Answer the question
In order to leave comments, you need to log in
Which Wordpress plugin can group images and display them?
Tell me a plugin that can group images by specified categories and display a list of images by category in an array:
<img src="1.jpg" />
<img src="2.jpg" />
...
<img src="10.jpg" />
Answer the question
In order to leave comments, you need to log in
In general, I solved the problem like this:
Installed the Enhanced Media Library plugin, created a taxonomy in it, then created categories in this taxonomy, sorted out the pictures, and already in the template code I pull out the necessary pictures with a request
$posts = get_posts(
array(
'post_type' => 'attachment',
'tax_query' => array(
array(
'taxonomy' => 'mediacat', //такса
'field' => 'slug', //поле, по которому ищем
'terms' => 'reviews' //слаг рубрики внутри таксы, из которой вытаскиваем картинки
),
),
)
);
foreach ($posts as $p) {
echo '<pre>' . print_r(wp_get_attachment_image_url($p->ID, 'full'), 1) . '</pre>';
}
echo '<pre>' . print_r($p->guid, 1) . '</pre>';
This is a very specific plugin. All this needs to be written in code.
There is no such plugin, but you can write it yourself. Or you can add classes to pictures and you can drive these pictures using php or js code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question