Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args = array(
- 'orderby' => 'name',
- 'order' => 'ASC'
- );
- $categories = get_categories($args);
- foreach($categories as $category) {
- echo '<a class="cover margin-ultimos" href="' . get_category_link( $category->term_id ) . '"><div id="cover-home" class="gray-shadow"><img src="'.(( $terms = get_the_category() ))? the_field( 'portada', 'category_'.$terms[0]->term_id ):'" alt="Portada'. get_the_title ( $ID ) . '" /></div></a>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement