ThemeShaper Forums » Thematic


Excerpt on front page -- "childtheme_override_content_init()" never called?

(9 posts)
  • Started 10 years ago by McSalty
  • Latest reply from Jagst3r15
  • This topic is resolved
  1. I'm trying to output excerpts on the homepage instead of full posts. In order to do so, I've added the following to my functions.php:

    function childtheme_override_content_init() {
            global $thematic_content_length;
            $content = '';
            $thematic_content_length = '';
            if (is_home() || is_front_page()) {
                    $content = 'excerpt';
            } elseif (is_single()) {
                    $content = 'full';
            } elseif (is_tag()) {
                    $content = 'excerpt';
            } elseif (is_search()) {
                    $content = 'excerpt';
            } elseif (is_category()) {
                    $content = 'excerpt';
            } elseif (is_author()) {
                    $content = 'excerpt';
            } elseif (is_archive()) {
                    $content = 'excerpt';
            $thematic_content_length = apply_filters('thematic_content', $content);

    (I just copied the contents of thematic_content_init(), and changed 'full' to 'excerpt')

    However, this has no effect, as if this function were never called. Any ideas?

    Posted 10 years ago #
  2. I had to use "childtheme_override_content()" anyway, so I ended up pasting

    if (!is_single()) $thematic_content_length = 'excerpt';

    As my first line. This works, but isn't clean. What is the purpose of thematic_content_init() if it isn't automatically called before thematic_content()?

    Posted 10 years ago #
  3. Are you sure the thematic_content_init function isn't being called? If so how? Trying to fix this problem too =]

    Posted 10 years ago #
  4. After working on this for quite a while, what was missing was you needed to add the action...


    I know it seems like you shouldn't have to do this because on line 801 the add_action function is called...


    However this is INSIDE the elseif statment, and is only run if the child override function does not exist.

    While my fix works, I propose that the "add_action" line be moved outside of the closing brace.

    Posted 10 years ago #
  5. This was fixed in the latest svn.


    Posted 10 years ago #
  6. derpayatz

    Hi, I've got the Thematic from the website, and the add_action is still inside the elseif.

    Posted 9 years ago #
  7. he is talking about thematic 1.0, which is in the process of being reviewed for approval in the repo. I uploaded it here for you - it is essentially stable so you can use it safely

    Posted 9 years ago #
  8. 0.9.8 is the version i've been supporting which was available at:

    admittedly a bit of a cluster$*&# that we had such an outdated version in the repo, but 1.0 is in the theme review queue.... (finally!)

    Posted 9 years ago #
  9. should have read more, i think 0.9.8 fixes that...soooo close to 1.0 though it might not even be worth using (unless it gets rejected lol).

    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.