Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chad99

    (@chad99)

    I was able to resolve this issue by adding an overlay over the background image, and positioning it absolute. I gave it a width and height of 100%; and the post links now work.

    <a href="<?php the_permalink(); ?>">
         <div class="overlay"></div>
    </a>
    Thread Starter chad99

    (@chad99)

    No plugins are running.

    The href=”” is displaying as 0,0 when I inspect. It is not taking up any space. When I give it height and width it breaks the layout.

    Thread Starter chad99

    (@chad99)

    I’ve tried wrapping the entire container in an href like this, but the anchor tag doesn’t wrap when I inspect in browser.

    My code:

    <a href="<?php the_permalink(); ?>">
    	<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?>
    		<div class="article" style="background: url('<?php echo $thumb['0'];?>')">
    
    				<?php the_title( sprintf( '<h1><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
    				<p class="date">
    					<?php twentysixteen_entry_meta(); ?>
    				</p>
    				<p class="category">
    					review
    				</p>
    				<span class="read-post">read post</span>
    		</div>
    	</a>

    Browser inspect:

    <a href="https://localhost:8888/sample-3/">
    			</a>
    <div class="article" style="background: url('https://localhost:8888/wp-content/uploads/2016/03/gogol.jpg')">
    <a href="https://localhost:8888/sample-3/">
    				</a>
    <h1><a href="https://localhost:8888/sample-3/"></a><a href="https://localhost:8888/sample-3/" rel="bookmark">Sample 3</a></h1>
    ....

    Thread Starter chad99

    (@chad99)

    Hi David, I only have the current build set up locally until I get it further along.

Viewing 4 replies - 1 through 4 (of 4 total)