开发者

wordpress optional post/page content loading

开发者 https://www.devze.com 2023-03-28 11:59 出处:网络
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 conten

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

精彩评论

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