• Ryan

    (@daobydesign)


    Hi, first – fantastic plugin. I’ve used it on several sites without a hitch and absolutely love it.

    On a recent site I had the Advanced Excerpt working beautifully utilizing the the_advanced_excerpt() template tag to control excerpts of various lengths for several different sections.

    I then moved the site to a new server, and though everything is still functioning without noticeable errors, the the_advanced_excerpt() has stopped overriding the default settings set in the SETTINGS->EXCERPT area.

    I can’t think of anything that would cause this in moving to a new server, but am hoping maybe someone (Bas?) may be able to point me in the right direction.

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have no idea why this is happening, unfortunately. The plugin code is pretty straightforward as far as overriding settings goes (it actually uses the exact same method of overriding default settings as any WP template tag does).

    Have you tried re-applying the Excerpt settings and/or re-installing the plugin?

    Thread Starter Ryan

    (@daobydesign)

    Thanks for the quick reply Bas.

    I’ve reinstalled the plugin, and then also re-copied all the core WP files just to make sure nothing was missing or corrupted – everything is working fine but this. Very bizarre.

    Adding to the weirdness is the fact that the override is functioning as intended on every other post. So, using the following code, I generate 6 posts:

    <?php query_posts('showposts=6&offset=0'); ?>
    <?php while (have_posts()) : the_post(); ?>
    	<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    		<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h1>
    		<?php bdw_get_fpimg($post->ID); ?>
    		<div class="entry">
    			<?php the_advanced_excerpt('length=80&use_words=0&no_custom=1&ellipsis=%26hellip;&exclude_tags=img,p,strong'); ?>
    			<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="read-more">read more</a>
    		</div>
    	</div>
    <?php endwhile; ?>

    You can see the result at http://openkyoto.com

    Post 1: the_advanced_excerpt template tag override works
    Post 2: doesn’t work, but advanced_excerpt’s default settings are used
    Post 3: works
    Post 4: doesn’t work
    Post 5: works
    Post 6: doesn’t work

    You can see this behavior repeats in the center column on the site as well. Even if I remove the center column (in case multiple query_posts calls were causing the problem) the result is the same.

    Any ideas?

    I’m having a similar problem — the_advanced_excerpt is not allowing me to override default settings. It doesn’t alternate for me, though — it never works.

    Ok, I found out what’s happening for me, at least. My problem was specifically with the allowed/excluded tags not being overidden.

    On line 333 of Advanced Excerpt 0.2.2, you have this:

    $allow_tags = $advancedexcerpt->array_complement($allow_tags, $exclude_tags);

    But $advancedexcerpt->array_complement doesn’t return anything, so the allowed tags gets erased before the filter function is called.

    Adding return $c; to the end of that function fixed it for me.

    Thanks for the heads-up. I don’t know why I forgot to include that line in the code, because it’s actually a crucial part of that rather simple function.
    The fix will be included in an update which I hope will be completed soon.

    Sorry for the late reply, by the way.

    Philip

    (@philipwalter)

    I’m curious if this update was ever completed?

    Philip

    (@philipwalter)

    I ask because I just had to perform this fix myself. It’s not difficult, but it took me forever to track down the problem.

    An update is out now. This problem (among others) has been fixed.

    Hi Bas,

    I’m using the latest version and I’m having issues with the template tag – the allowed_tags parameter doesn’t work (all the markup is removed); if I set the exclude_tags parameter, only the tags I set are excluded but the lenght isn’t working (it just the whole content).

    Any ideias?
    Thanks – great plugin!

    And it gets weirder 🙂 Apparently, the post lenght is only counting characters/word on the first paragraph.

    I’m having the same issue here. Allowed tags does not work. Will there be a fix for this soon?

    Im having a problem where for some reason advanced excerpt only allows me to use up to 53 words when i am using thumbnails for excerpts. If thumbnails is deactivated, it works.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Advanced Excerpt Template Tag not doing its job’ is closed to new replies.