Results 1 to 2 of 2

Thread: useless action hook

  1. #1
    Thread Starter
    Amateur davidhaz's Avatar
    Join Date
    Mar 2011
    Thanked 8 Times in 6 Posts

    useless action hook

    hi all
    i'm currently working on a plugin to filter and sort search results but i got stuck when i figured out there is no appropriate action hook to attach the plugin to. here's the thing: the standard CP search results page uses a "get_template_part" function to include the "ad_listing-loop.php" template which processes the search query and displays the results. the "ad_listing-loop.php" template does have action hooks before and after the loop, which is fine. the problem is this template is only included if there are results to be displayed (that is only if "have posts ()"), otherwise it's not called and so are the attached action hooks.
    in short: may be CP developers should think about adding an action hook to the "else" argument on the search results page so plugins can still hook into that page even if no results are found.
    thanks for any help.

  2. #2
    laura's Avatar
    Join Date
    Apr 2010
    Thanked 279 Times in 254 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [TUTORIAL] Child Theme : Unhook ( remove hook ) default appthemes functions
    By amine0272 in forum ClassiPress General Discussion
    Replies: 9
    Last Post: August 6th, 2013, 02:42 PM
  2. Replies: 3
    Last Post: April 27th, 2013, 05:48 AM
  3. [SOLVED] Action hook - what is wrong here?
    By samcy in forum ClassiPress General Discussion
    Replies: 24
    Last Post: May 1st, 2012, 04:59 PM