Forum: Feature Requests

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Feature Requests premium extension please open a new premium support ticket.

[Resolved]modifying the search query class

Forums Feature Requests modifying the search query class

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #45691

    Hi, nice plugin.
    I’d like to modify the search result and add my own content. I want to pull in a few metaboxes and put them in the info_window_content(). I can do this by editing the core file, but is there a method to do this correctly? A pluggable function or filter I ought to be using?

    I know that we can create forms by copying the folder /plugins/posts/FOLDERNAME
    but the /includes folder doesn’t seem to follow that same logic. Copying and modifying the
    /plugins/posts/includes/ folder and altering the copy (gmw-pt-search-query-class.php) does not supersede the core plugin file version.

    Is there a plan to make the includes follow the same logic as forms?

    Is there a way to do what I need already (modify the search result functions) , which I have missed?

    thanks for a great plugin – Steve


    Hi Steve,

    The only PHP files follow the theme-child theme logic are template files; template files that displaying some kind of results. search results, single template file and so on.

    Since you already looked at the gmw-pt-search-query-class file you should see a filter within the info_window_content method:

    This filter allows you to modify the content of the info-window. If you know how to use WordPress filters you should be able to do that.

    Let me know if you have any questions.


    Thanks Eyal, aha!
    I had missed the obvious clue. In fact I had looked at those apply_filters() before and wrongly assumed there was an add_filter() somewhere else. I even had a look around for where you had put the corresponding add_filter() definition and when I didn’t find it I was confused. I obviously am not a clever man. I understand now.

    Thanks for the response, it helped

    – Steve


    You are welcome Steve.

    And I don’t think it has to do with how clever one is. Just about practice and understanding WordPress hooks system which can be confusing at first.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.