Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Link my PostThumbnail/Featured Image to post / featured image in wordpress/Thematic Child them.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32176
    mikeman
    Member

    On
    http://ocixx.com/imretarded/

    I finally got my post thumbnails to work, but now I can’t seem to find any information on linking them to their relevant post. I would like my viewers to be able and click the post thumbnail and bring them to the post it belongs to.
    Could anyone help me out,,
    this is my functions.php file so far, how would I make them link?

    
    
    function childtheme_content($content) {
    if ( is_home () ) {
    $content= 'image';
    }
    return $content;
    }
    add_filter('thematic_content', 'childtheme_content');

    function childtheme_image_post($post){
    global $thematic_content_length;

    if ( strtolower($thematic_content_length) == 'image' ) {
    $post = '';
    if ( has_post_thumbnail() ) {
    $post .= '' . get_the_post_thumbnail(get_the_ID(), 'medium') . '';
    }
    }
    return $post;
    }
    add_filter('thematic_post', 'childtheme_image_post');

    function childtheme_override_postheader_postmeta(){

    //the sound of one hand clapping
    }

    function childtheme_override_index_loop(){
    global $options, $blog_id;

    foreach ($options as $value) {
    if (get_option( $value ) === FALSE) {
    $$value = $value;
    } else {
    if (THEMATIC_MB)
    {
    $$value = get_option($blog_id, $value );
    }
    else
    {
    $$value = get_option( $value );
    }
    }
    }

    /* Count the number of posts so we can insert a widgetized area */ $count = 1;
    while ( have_posts() ) : the_post();
    $counter++;

    thematic_abovepost(); ?>





    if (!(THEMATIC_COMPATIBLE_POST_CLASS)) {
    post_class();
    echo '>';
    } else {
    echo 'class="';
    thematic_post_class();
    echo '">';
    }
    thematic_postheader(); ?>



    ' .__('Pages:', 'thematic') . '&after=
    ') ?>







    thematic_belowpost();

    comments_template();

    if ($count==$thm_insert_position) {
    get_sidebar('index-insert');
    }
    $count = $count + 1;
    endwhile;
    }

    // filter thematic_sidebar() .. no display for the page 'Forum', keep it for the rest
    function remove_sidebar() {
    // We test if we are on the page 'Forum'
    if (is_home()) {
    // Yes, we are .. now we switch off the sidebar
    return FALSE;
    } else {
    // we are not .. we leave the switch on
    return TRUE;
    }
    }
    // Connect the filter to thematic_sidebar()
    add_filter('thematic_sidebar', 'remove_sidebar');

    //different style sheet for the homepage
    // filter thematic_create_stylesheet to implement your own stylesheets
    function my_stylesheet($content) {
    // We test if we're on home or on your frontpage
    if (is_home() || is_front_page()) {
    // yes, we are .. now let's load the 3c-fixed layout
    $content = "t";
    $content .= " $content .= get_bloginfo('stylesheet_directory') . "/style-home.css";
    $content .= "" />";
    $content .= "nn";
    } else {
    // we are not .. let's load the 2c-r-fixed layout
    $content = "t";
    $content .= " $content .= get_bloginfo('stylesheet_directory') . "/style.css";
    $content .= "" />";
    $content .= "nn";
    }
    // $content will be handed back to thematic_create_stylesheet
    return $content;
    }
    // connect the filter to thematic_create_stylesheet
    add_filter ('thematic_create_stylesheet', 'my_stylesheet');
    //end different style sheet for the homepage

    ?>
    #53305
    TheDoc
    Member

    When you’re running your loop:



    ">

    #53264
    TheDoc
    Member

    Never worked with child themes. The code above will insert a post thumbnail with the page’s permalink wrapped around it. I recommend rocking some trial and error. Or perhaps somebody else with more time can help you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.