custom permalink
-
I have a custom loop that dislplays 4 pictures.
I use a custom feild in the loop that I can direct the url where I want(custom url)..I want to wrap the loop (the whole image not only the title) in permalink.
The loop,
<div class="home-callouts"> <ol class="listing releases"> <?php query_posts('category_name=news&orderby=date&order=ASC&posts_per_page=4'); ?> <?php if(have_posts()) : while(have_posts()) : the_post(); ?> <?php if (has_post_thumbnail()) : ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );?> <?php endif; ?> <li class="item callout"> <div class="figure"> <a href="<?php the_field('link_url'); ?>" style="background-image: url('<?php echo $image[0]; ?>');"></a> </div> <div class="header"> <div class="grid-item-animation-overlay"></div> <span class="more"> <a href="<?php the_field('link_url'); ?>"><?php the_title();?> </a> </span> </div> </li> <?php endwhile; endif; ?> </ol> </div> </div>
Can I also make the permalink work better on mobile/touch screens?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘custom permalink’ is closed to new replies.