<?php
$categories = get_categories(array(
'orderby' => 'name',
'order' => 'ASC',
'taxonomy' => 'album',
'post_type' => 'gallery'
));
foreach ($categories as $cat) {
$id = $cat->cat_ID;
$link = get_category_link($id);
$img = get_field('img_album', $cat);
$desc = get_field('desc_album', $cat);
echo '
<div class="album__item">
<a href="'.$link.'"><img class="album__img" src="'.$img.'" alt="'.$cat->cat_name.'"></a>
<div class="album__desc">'.$desc.'</div>
</div>
';
}
?>
<?php
$categories = get_categories(array(
'orderby' => 'name',
'order' => 'ASC',
'taxonomy' => 'album',
'post_type' => 'gallery'
));
foreach ($categories as $cat) {
$id = $cat->cat_ID;
$link = get_category_link($id);
$img = get_field('img_album', $cat);
$desc = get_field('desc_album', $cat);
echo '
<div class="album__item">
<a href="'.$link.'"><img class="album__img" src="'.$img.'" alt="'.$cat->cat_name.'"></a>
<div class="album__desc">'.$desc.'</div>
</div>
';
}
?>
$(document).ready(function() {
$(function() {
$('ul li').hover(function() {
$(this).animate({
width: "300px",
}, {
duraction: 7000,
easing: "easeOutBounce"
});
}, function() {
$(this).animate({
width: "100%",
}, {
duraction: 7000,
easing: "easeOutBounce"
});
});
});
});