I have been struggling with this for hours, and cannot come up with the right way to do it.
how do i replace the thematic_content() with the ct_content() [ct for child theme) function of my own,
i tried removing the action, and adding the new one.
with filters,
nothing came up. it seems like there is no easy way to do this.
can anybody help
thanks in advance for your help
ThemeShaper Forums » Thematic
how do i replace thematic_content()
(6 posts)-
Posted 2 years ago #
-
Could you please explain what you're trying to do with your ct_content() ?!
Chris
Posted 2 years ago # -
i want to add many things, that i will have to create a new function. but for explaining purposes, it could be anything. a string replacement if you want.
but it has to be in a new function.i was looking around and i can tell its badly done because the thematic_content() prints the results when it should be returning it, which makes it difficult to work upon that. am i wrong?
if you have an example of how to replace it, it will save me from another big headace
thanksPosted 2 years ago # -
If you really looked around you should have got the intention of the filter thematic_content(), and that you can filter the content either using the standard filter the_content() or thematic_post().
Chris
Posted 2 years ago # -
thanks for replying.
here's the code to exemplify my situation:comment out one by one the add_filter lines.
code updated after 3 mintues of posting it
<?php //functions.php function child_content($content) { $content = "CHILD_".md5($content); return $content; } function alt_child_content($content) { $content = apply_filters('alt_child_content', $content); $content = "ALT_CHILD_".md5($content); return $content; } //add_filter('the_content', 'child_content'); //it works //add_filter('the_content', 'alt_child_content'); //it works //add_filter('thematic_content', 'child_content'); //it DOESN'T work //add_filter('thematic_content', 'alt_child_content'); //it DOESN'T work //add_filter('thematic_post', 'child_content'); //it works //add_filter('thematic_post', 'alt_child_content'); //it works ?>for some reason filters don't work for thematic_content
any clues?
thanksPS: this is done in a clean install of thematic, for the thematicsamplechildtheme
Posted 2 years ago # -
thematic_content() was never created for this. Take a look here:
http://themeshaper.com/forums/topic/adding-a-loop#post-3684
Chris
Posted 2 years ago #
Reply
You must log in to post.