ThemeShaper Forums » Thematic


New content filter

(4 posts)
  • Started 12 years ago by sabinhas
  • Latest reply from helgatheviking
  • This topic is not resolved
  1. sabinhas

    Hi guys
    im trying to do a filter on my content but this function that i made doesnt seem to work. someone can help me? thanks in advance.

    function thematic_content_new() {

    if (is_category('shop')) { ?>

    <div class="view view-first"><img class="alignleft" title="<?php echo get_the_title(); ?>" src="<?php echo get_post_meta(get_the_ID(), 'image-shop', true); ?>" /></div>
    <div class="price"><?php echo get_post_meta(get_the_ID(), 'price-shop', true); ?></div>
    <div class="description"><?php echo get_post_meta(get_the_ID(), 'hover-shop', true); ?></div>
    <div class="buttons"><?php echo get_post_meta(get_the_ID(), 'buybuttons-shop', true); ?></div>


    Posted 12 years ago #
  2. sabinhas

    Hi helga. thks for your help. can you just tell me if im doing the right thing on there. what can you see wrong on that code?

    Posted 12 years ago #
  3. well you aren't filtering correctly, or targeting the correct filter. with filters you have to return a variable.

    return $something;

    if you don't (as you aren't above) then nothing will happen.

    look closely at content-extentions.php. the thematic_content filter decides whether to show full posts or excerpts.

    the function that controls what that content will actually be is called thematic_content, but that function concludes with

    echo apply_filters('thematic_post', $post);

    so the appropriate filter name is thematic_post. filters and functions are not required to have the same name, even though they commonly do in thematic.

    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.