[wp-trac] Re: [WordPress Trac] #2424: Filter hook for page content
WordPress Trac
wp-trac at lists.automattic.com
Sat Feb 11 03:55:30 GMT 2006
#2424: Filter hook for page content
-------------------------+--------------------------------------------------
Id: 2424 | Status: closed
Component: Template | Modified: Sat Feb 11 03:55:30 2006
Severity: enhancement | Milestone:
Priority: normal | Version: 2.0.1
Owner: anonymous | Reporter: cre8d
-------------------------+--------------------------------------------------
Changes (by markjaquith):
* resolution: => wontfix
* status: new => closed
Comment:
You can do this by using the is_page() function to tell what you're
showing currently.
{{{
function my_page_filter($content) {
if ( !is_page() ) return $content; // only want this to work on pages
// do your filter stuff here
return $content;
}
add_filter('the_content', 'my_page_filter');
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/2424>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list