ThemeShaper Forums » Thematic

[closed]

on the front page, display the first item as full content and next two excerpts

(3 posts)
  • Started 4 years ago by awelch
  • Latest reply from rscamero92
  • This topic is not resolved
  1. awelch
    Member

    Hi I would like the first post to display fully, and then the next two posts to display the excerpt along with a post- thumbnail.

    How would I do this with thematic? I am still getting my head around the functions.

    Thanks

    andy

    Posted 4 years ago #
  2. What about the other posts? Or do you display only 3 posts?

    This code will display the first post on your front page / blog page as full content and everything else excerpt only:

    function front_page_content($content) {
    	// We need some global data. $thematic_post_alt is the post number on a page.
            // $paged is the page number
    	global $thematic_post_alt, $paged;
    	// Check if we are on the Front page or on our Blog page. You might want to
    	// change this first check according to your installation.
    	if (is_home() || is_front_page()) {
    		// Check if we are on the first page and if it is the first
                    // post on this page
    		if (($paged < 2) && ( ($thematic_post_alt-1) == 1 )) {
    			// The first post on the first page will be full content
    			$content = 'full';
    		} else {
    			// Everything else will be excerpt
    			$content = 'excerpt';
    		}
    	}
    	// Return the controll to the thematic_content filter hook
    	return $content;
    }
    // Hook our function into thematic content
    add_filter('thematic_content', 'front_page_content');

    Chris

    Posted 4 years ago #
  3. HUGS to you Chris!!! I have been looking for something like this for a few days and was ready to give up on messing with it! My question is..... I want the excerpts to be in 2 columns under the 1st full post.... how would I do this?

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.