[wp-hackers] is it possible to change the_title halfway into the processing of a page/post?

Mike Little wordpress at zed1.com
Thu Feb 23 15:35:39 UTC 2012

On Thu, Feb 23, 2012 at 15:20, Jeremy Clarke <jer at simianuprising.com> wrote:

> On Wed, Feb 22, 2012 at 3:47 PM, Mike Little <wordpress at zed1.com> wrote:
> >
> > add a hook for 'the_content', that calls your display functions.
> > That way, any theme that calls the_content on your page will be get your
> > display output.
> >
> >
> I have a feeling for this use-case a [shortcode] would work better. Indeed
> all the logic should be in a plugin rather than the theme, but define a
> shortcode instead of filtering all the_content, so that it only applies to
> pages where you actually want it (likely a single page).
I described a plugin (and wrote) so that it would work with any theme. And
my example only filters the content where it is needed.

Mike Little

More information about the wp-hackers mailing list