• Resolved ember.crooks

    (@embercrooks)


    On my home page, when I hover over the excerpt, the title and the picture change color slightly. This gives the impression that you can click on the excerpt to go to the full post. But to go to the full post, you must click only on the title or the image – clicking on the excerpt does not go anywhere.

    So what I would like to do is either of:

    1. Change the hover behavior so that only hovering over the title or the title of a post makes them change color
    2. Change the excerpt behavior so users can click on the excerpt to get to the full post

    I messed with the css a bit in my child theme, but couldn’t get it to work right. Can anyone help me figure out how to do either of these?

    My site is https://db2commerce.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi ember. Since you’re not using a Featured post you should be able to accomplish #1 by editing one file. Copy content.php from the parent theme to your child theme. At the top of the code you’ll see this:

    <div class="post-inner post-hover">

    Change it to this:

    <div class="post-inner">
    	<div class="post-hover">

    The last part of the code looks like this:

    <h2 class="post-title">
    	<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    </h2><!--/.post-title-->
    
    <?php if (ot_get_option('excerpt-length') != '0'): ?>
    <div class="entry excerpt">
    	<?php the_excerpt(); ?>
    </div><!--/.entry-->
    <?php endif; ?>
    
    </div><!--/.post-inner-->

    Insert a new closing div tag between the title and excerpt:

    <h2 class="post-title">
    	<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    </h2><!--/.post-title-->
    
    	</div><!--/.post-hover-->
    
    <?php if (ot_get_option('excerpt-length') != '0'): ?>
    <div class="entry excerpt">
    	<?php the_excerpt(); ?>
    </div><!--/.entry-->
    <?php endif; ?>
    
    </div><!--/.post-inner-->

    You shouldn’t need to make any css changes.

    Thread Starter ember.crooks

    (@embercrooks)

    Wow, perfect. The support on this forum is awesome – thanks so much for your help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing default hover behavior for excerpts’ is closed to new replies.