All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: donotprint and the_excerpt  (Read 736 times)

0 Members and 1 Guest are viewing this topic.

Offline sonoma

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: sandbox
donotprint and the_excerpt
« on: 23 November 2009, 21:11 »
The donotprint shortcode seems to be affecting the_excerpt. We want to have the normal excerpts on our homepage and category pages, but only want to print specific areas on posts.

donotprint is removing content from the_excerpt.

Is there a work around for this?

I have also tried get_the_excerpt, and that doesn't work. I also tried using a truncated version of the_content, but that didn't work because of images.

Offline sonoma

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: sandbox
Re: donotprint and the_excerpt
« Reply #1 on: 23 November 2009, 21:29 »
I also tried the_content_rss, which is very close to what we need, because it strips html, but it prints "[donotprint]" if in the excerpt.

Offline sonoma

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: sandbox
Re: donotprint and the_excerpt
« Reply #2 on: 23 November 2009, 21:34 »
I tried in funcions.php:
add_filter('the_excerpt', 'do_shortcode');

but that doesn't work...

hmmmm - there has to be a way!

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: donotprint and the_excerpt
« Reply #3 on: 24 November 2009, 05:03 »
I don't see why it will affect the excerpt as in WP-Print I did not touch excerpt. And Excerpt does not touch shortcode at all, so if there is shortcode in Excerpt it will not work.

I tested with Do Not Print

This is the code of my post content
Code: [Select]
Print 1
[donotprint]
It is in do not pront
[/donotprint]
Print 2

This is content of my post excerpt
Code: [Select]
Excerpt.
This is my index.php Template
Code: [Select]
<?php the_content('Read the rest of this entry &raquo;'); ?>

<?php the_excerpt(); ?>

The excerpt works fine for me.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline sonoma

  • Newbie
  • *
  • Posts: 7
    • View Profile
  • WordPress Version: WordPress 2.8.x
  • Theme Name: sandbox
Re: donotprint and the_excerpt
« Reply #4 on: 24 November 2009, 19:35 »
We will be using WP-Print for posts in two categories only, so for those posts we will add a custom excerpt for each.

I didn't even think to use a custom excerpt, but your post reminded me of this in Wordpress  :)

Thanks!