link target and excerpts needed
-
I have a child theme for twenty-eleven and I am using the following for pagination navigation in single.php:
<div id="cooler-navnav-below" class="navigation"> <?php $prevPost = get_previous_post(true); if($prevPost) {?> <div class="nav-box previous"> <?php $prevthumbnail = get_the_post_thumbnail($prevPost->ID, array(100,100) ); ?> <?php previous_post_link('%link',"$prevthumbnail <p>%title</p>", TRUE); ?> </div> <?php } $nextPost = get_next_post(true); if($nextPost) { ?> <div class="nav-box next" style="float:right;"> <?php $nextthumbnail = get_the_post_thumbnail($nextPost->ID, array(100,100) ); ?> <?php next_post_link('%link',"$nextthumbnail <p>%title</p>", TRUE); ?> </div> <?php } ?> </div><!--#cooler-nav div -->
It’s pretty sweet, but I need to add two things: one is to put the post’s excerpt below the title. But doing
<p>%title<br>%excerpt</p>
doesn’t work.
So how can I do that?Also, my page has <base target=”_blank”> but I want the next/previous links to open in the same window, so how would I define that? Obviously %link is the
<a>
tag, but how can I enter target=”_self”?Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘link target and excerpts needed’ is closed to new replies.