Support » Plugins and Hacks » [Resolved] posts_request, admin or front-end

[Resolved] posts_request, admin or front-end

  • when using the ‘posts_request’ hook in a plugin, what is the best way to determine if the function has been called by the front-end or by the manage posts page in admin ?


Viewing 1 replies (of 1 total)
  • I think the solution is if you have say

    and you do not want your function to have any effects when posts are listed in e.g. Manage > Posts

    function myfunction() {
    	global $wp_query;
    	if(!$wp_query->is_admin) {
            // do front-end stuff here
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] posts_request, admin or front-end’ is closed to new replies.