wordpress optional post/page content loading
I want to check some parameters before loading a page or post content. If parameter match with a specific value i want to take some action like running some javascript, notifying users, locking contents etc.
I don't want to edit theme. Please suggest so开发者_如何学编程me hook or snippet to do it separately instead of modifying existig code.
You may use the_post action hook or filters like the_content or the_title, it depends on what you want to do.
The complete list of all hooks: http://adambrown.info/p/wp_hooks/hook
About using the_post hook: http://wordpress.org/support/topic/how-to-use-the_post-action-hook
精彩评论