Title beneath featured image, breadcrumbs beneath title

  • mistermango

    #3993

    I’m trying to place an image above the title. Is there a way to call the post’s featured image (if one exists) before the post’s title?

    I’m also trying to place breadcrumbs beneath the post title, before the content. Is there a way to position breadcrumbs between the title and the content? I’m using Breadcrumb NavXT.

    Thanks.

    Mod

    Kenneth John Odle

    #26729

    I’m trying to place an image above the title. Is there a way to call the post’s featured image (if one exists) before the post’s title?

    Try an action hook widget along with the PHP widget. Drag a PHP widget to the appropriate action hook widget area (something above the title) and use this code:

    <?php the_post_thumbnail(); ?>

    This link will show you how to style the thumbnail size: http://codex.wordpress.org/Post_Thumbnails#Styling_Post_Thumbnails

    Or you can use this custom css:

    .attachment-post-thumbnail {style info;}

    Not tested; YMMV.

    I’m also trying to place breadcrumbs beneath the post title, before the content. Is there a way to position breadcrumbs between the title and the content? I’m using Breadcrumb NavXT.

    Again, action hook widget area and the PHP widget.

    Try this code in the PHP widget:

    <div class="breadcrumbs">
    <?php if(function_exists('bcn_display'))
    {
    bcn_display();
    }?>
    </div>

    You might want to change the class of the <div> (.my-breadcrumbs for instance) so you can style your breadcrumbs how you like and hide the ones the plugin is adding.

    Again, not tested; YMMV. And someone may come up with a simpler method.

Viewing 2 posts - 1 through 2 (of 2 total)

  • You must be logged in to reply to this topic.