December 2017
Beginner
458 pages
7h 52m
English
We want to do a little extra in the content-gallery.php file. We will add a class to the images so that we can do the animation and stuff like that. For this, we will create an array of attributes. In the div, let's add the following code:
<div class="post-thumbnail"> <?php $attr = array( ); ?></div>
Next, in the array, we will put in class and we want that to be w3-animate-opacity class. Then, we also want a hover effect for which we can use w3-hover-opacity:
<div class="post-thumbnail"> <?php $attr = array( 'class' => 'w3-animate-opacity w3-hover-opacity' ); ?></div>
Now, each image is going to have a link around it. So, after the array of attribute, we will add <a href="php echo the_permalink()"></a> ...
Read now
Unlock full access