Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix featured image placement #12

Open
wants to merge 1 commit into from

2 participants

@jeherve

Hi,

I have had to change entry-post.php to fix an issue nighthawk had with featured images. They appeared above the post title, instead of within the post (see image below).

So here is my commit, just in case!

Wrong image placement

Fixed

@jeherve jeherve Changed Featured image placement
Place image below title to fix floating issue
9553280
@mfields
Owner

This is not actually a bug, but is how Nighthawk is intended to treat featured images. Both the image and the title should "align top" to one another. I can see what you are going for here and I think your design looks really great with the title underlined. I can see if I can work in a solution where the title is the first thing displayed as this is a much better thing to do. I should be able to float the title left and the image right so it behaves how I want it to while allowing it to do what you need at the same time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 16, 2011
  1. @jeherve

    Changed Featured image placement

    jeherve authored
    Place image below title to fix floating issue
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 entry-post.php
View
8 entry-post.php
@@ -36,6 +36,10 @@
/*print '<a href="' . esc_url( get_permalink() . '#respond' ) . '" class="comment-icon" title="' . esc_attr__( 'Add a comment', 'nighthawk' ) . '"><img src="' . get_template_directory_uri() . '/images/comment.png" alt="" /></a>';*/
break;
default :
+ if ( ! is_singular() ) {
+ the_title( "\n" . '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h2>' );
+ }
+
$featured_image = get_the_post_thumbnail();
if ( ! empty( $featured_image ) ) {
print "\n" . '<div class="featured-image">';
@@ -43,10 +47,6 @@
print '</div>';
}
- if ( ! is_singular() ) {
- the_title( "\n" . '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h2>' );
- }
-
print "\n" . '<div class="entry-content">';
the_content( __( 'Continue Reading', 'nighthawk' ) );
print "\n" . '</div><!--entry-content-->';
Something went wrong with that request. Please try again.