Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
include the post thumbnail on the excerpt and output html « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

include the post thumbnail on the excerpt and output html

(1 post)
  • Started 4 years ago by awelch
  • This topic is not resolved
  1. awelch
    Member

    Hi,

    I am using below to output the excerpt for 2nd and 3rd items on first page. I want to include the post thumbnail in the excerpt and output some html tags around the exceprt like <div class="excerpt"> and include a title and a little bit of the post text. Would it be better to output a modified content tag and how would I filter the content returned?

    thanks

    andy

    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');

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183