ThemeShaper Forums » Thematic

custom field for sidebar image

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

    I am new to child themes and am trying diligently to understand the framework.

    I need to display a custom field image absolutely so it displays in the "sidebar".

    I have been able to target all images in the .content-entry with css and place them correctly in the "sidebar". But that is not a solution.

    I have also read http://themeshaper.com/forums/topic/introducing-custom-fields-into-thematic and have a better understanding of how the functions file plays into this.

    As of yet I have been unsuccessful with this task.

    This is what I have:

    In the functions file:

    function sidebar_image($sidebar_image) {
    	$sidebar_image = get_post_meta($post->ID, 'sidebar_image', true);
    	return $sidebar_image;
    }
    add_filter('thematic_sidebar_image', 'sidebar_image');

    In the css:

    #sbimg{
    	position: absolute;
    	left: 40px;
    	top: 0px;
    }

    In the sidebar_image Custom Field:

    <img id="sbimg" src="path to image" />

    Any assistance is appreciated.

    Thanks in advance. Seth

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.