Title: Admin Search Plugin &#8211; replace admin_content?
Last modified: August 18, 2016

---

# Admin Search Plugin – replace admin_content?

 *  [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/)
 * I have something like 500 pages already. I am building a plugin that checks to
   see if this is an edit page, and if so, it will load a search form (it will be
   a FULTEXT search) instead of all of the pages. Problem is, I do not see a hook
   for admin_content. Anyone have any ideas about how to turn off the content and
   replace with my search form without modifiying the core? I am trying to do it
   as a plugin so… gotta follow the rules.
 * Thanks.

Viewing 15 replies - 1 through 15 (of 15 total)

 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158737)
 * Does it _have_ to hijack the existing pages? Seems like it would be easier to
   have simply another menu that is a “Search Fulltext” tab instead of trying to
   work into the existing system. Just a thought.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158748)
 * Only reason that I want to replace it is that when I click on the manage tab,
   all of the pages start to load and there is no pagination. So the server usually
   times out.
 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158750)
 * I’m confused now… when I click on the Manage tab, it loads the Posts management
   page which only shows the most recent 15 posts. How is yours displaying the Pages
   interface?
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158752)
 * Sorry, shoudl have been clearer. If you click on pages, it loads pages. But there
   is no search. That is what I am trying to build.
 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158928)
 * Funny you should ask, Dave. I’m actually doing that very thing right now — “hijacking”
   an existing page to modify the display — and I’ve finally gotten it going. Later
   today or tonight I’ll be setting up a test on my public server so I can verify
   functionality and then I’ll be posting it afterwards. Once I do I’ll post here
   and you can see how I did it.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158937)
 * Awesome, thanks for the word. I should have this search plugin complete by the
   end of the week. Oh wait, thats tomorrow. Ok, next week. LOL.
 * Thanks.
 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158955)
 * [Here you go](http://www.coldforged.org/paged-comment-editing-plugin/), Dave.
   The page I’m replacing is the Manage -> Comments page, but the method should 
   be easily applied to any page.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158957)
 * Um, wow. That is beautiful. However, I have NO idea how to hijack the page. Any
   advice on how to implement? I looked through your code, and I see where it is
   supposed to happen, but the logic is not sinking in.
 * Any tips?
 * Lemme know.
 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158959)
 * I’m essentially replacing the entire page with my own version of the existing
   page. As far as gotchas one of the biggies is that globals that the existing 
   admin pages expect to exist are declared outside the scope of your plugin hook
   function, so you’ll need to “global” them to get them in-scope. Aside from that,
   everything else should be gleanable from the code.
 * Good luck!
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158960)
 * Sorry to bother you with this. The function you do this with is “PagedCommentEditing_add_submenu()”
   correct?
 * I really appreciate your time.
 *  [ColdForged](https://wordpress.org/support/users/coldforged/)
 * (@coldforged)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158963)
 * That’s the one that does the actual hijacking, yup.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158964)
 * Also, don’t know if you know this but $tablecomments etc is being depreciated
   for $wpdb->comments.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158966)
 * You are the man. Thanks. I will keep chewing through this until I can get it.
   Thanks again.
 *  Thread Starter [dave_merwin](https://wordpress.org/support/users/dave_merwin/)
 * (@dave_merwin)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-158969)
 * Ok, I am over my head. I have a couple of questions but don’t want to waiste 
   bandwidth. If you are interested in helping, you can email me at dave at agiprofessional
   dot com and let me know. I would like to send you code with questions. I am not
   looking for you to do it. Just for you to explain why you did what you did.
 * Thanks ahead of time.
 *  [bakert](https://wordpress.org/support/users/bakert/)
 * (@bakert)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-159223)
 * Don’t suppose you ever got this going did you Dave?

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Admin Search Plugin – replace admin_content?’ is closed to new replies.

 * 15 replies
 * 3 participants
 * Last reply from: [bakert](https://wordpress.org/support/users/bakert/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/admin-search-plugin-replace-admin_content/#post-159223)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
