开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜