ThemeShaper Forums » Thematic


magazine style homepage

(2 posts)
  • Started 9 years ago by kim4true
  • Latest reply from kim4true
  • This topic is resolved
  1. I followed instructions in a book, "Build Your Own Wicked WordPress Themes", and successfully got my homepage rearranged so that it displays a limited number of posts across a full-width page, with a thumbnail for the first post.

    See it at:

    I am a novice with php, and the book left me hanging on a few points. Here are the things I am having difficulty with. Any and all help would be appreciated:

    1. I want the post for the first thumbnail to display the whole book-cover, but it is getting cropped.

    2. I'd like to be able to post a custom excerpt for the homepage so that the styling is better, and more text is included, but can't work out where/how to filter that.

    3. I'd like to display only one category on the homepage, but again, I'm stumped!


    Here's the code on my child-theme's function.php:


    // Add support for thumbnails
    set_post_thumbnail_size(300, 482, false);
    add_image_size('homepage-thumbnail',300, 482, false);

    // output a list of top-level pages
    function authorsite_footer_pagelinks() {
    echo '<ul id="simplepages">';
    echo '';

    // Add Header Image
    function thematic_logo_image() {
    echo '<span id="header-image"></span>';

    // custom homepage loop
    function authorsite_indexloop() {
    $counter = 1;
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>">
    <?php thematic_postheader();
    if ($counter == 1 && has_post_thumbnail() && !is_paged()) {
    } ?>
    <div class="entry-content">
    <?php the_excerpt(); ?>
    " class="more"><?php echo more_text() ?>
    <?php $counter++; ?>
    </div><!-- .post -->
    <?php endwhile; else: ?>
    <p>Something is not working quite right here. Please contact us and let us know using the contact link you'll find in the top menu. Thank you!</p>
    <?php endif;



    and here's the home.php:


    // calling the header.php

    // action hook for placing content above #container


    <div id="container">

    <?php thematic_abovecontent(); ?>

    <div id="content">


    // create the navigation above the content

    // calling the widget area 'index-top'

    // action hook for placing content above the index loop

    // action hook creating the index loop

    // a custom homepage loop

    // action hook for placing content below the index loop

    // calling the widget area 'index-bottom'

    // create the navigation below the content
    // thematic_navigation_below();


    </div><!-- #content -->

    <?php thematic_belowcontent(); ?>

    </div><!-- #container -->


    // action hook for placing content below #container

    // calling the standard sidebar
    // thematic_sidebar();

    // calling footer.php


    and this is the homepage specific css from the stylesheet:

    /* =Homepage specific styles
    -------------------------------------------------------------- */
    body.home #container {
    float: none;
    margin: 0;
    body.home #content {
    margin: 0 0 0 10px;

    body.home .hentry {
    width: inherit;

    body.home ul#simplepages {
    width: 940px;
    margin: 0 auto;

    body.home ul#simplepages li {
    list-style-type: none;
    display: inline;
    margin-right: 30px;

    body.home div.p1 {
    font-size: 120%;
    height: 325px;

    body.home div.p1 img {
    float: left;
    margin-right: 30px;

    body.home div.p2 {
    clear: left;

    body.home div.p2,
    body.home div.p3,
    body.home div.p4 {
    width: 270px;
    float: left;
    margin-top: 22px;

    body.home div.p3 {
    margin-left: 30px;
    margin-right: 30px;

    Posted 9 years ago #
  2. O.K., I haven't got the homepage working yet, but the rest of the posts benefited from this post about excerpts:

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.