Ready to get started?Download WordPress


Simple User Listing
[resolved] Remove Search from list (7 posts)

  1. DeadForce
    Posted 1 year ago #

    Is there any way to remove the search form from the user list?

    Thanks in advance.


  2. DeadForce
    Posted 1 year ago #

    Already resolved it, it's as simple as making an if statement in your own search-author.php.

    Asked for help a little to soon.

  3. helgatheviking
    Plugin Author

    Posted 1 year ago #

    If you browse through the code, you will notice that both search and navigation are added to action hooks in the shortcode. Therefore, you can also unhook them the same way you'd unhook any WordPress function.

    function kia_remove_search(){
    	global $simple_user_listing;
    	remove_action( 'simple_user_listing_before_loop', array( $simple_user_listing, 'add_search' ) );
    add_action( 'wp_head', 'kia_remove_search' );

    Though your method is also totally viable. There's more than one solution here.

  4. DeadForce
    Posted 1 year ago #

    Used your method, its more clean.

    Thanks for the wonderful support.

  5. Alpinegirl
    Posted 12 months ago #

    I'd like to remove the search feature too, but I'm still learning to work with the code.

    Looking at the code you provided here (i.e. function kia_remove_search) do I add this into the existing code in the search-author.php document, or do I use it to replace the code at search-author.php instead?

    My apologies if my question seems convoluted. I'm very new at all of this yet, but I appreciate your patience.

    Thanks in advance for your help!

  6. helgatheviking
    Plugin Author

    Posted 12 months ago #


    The above code goes in your theme's functions.php file.

    Here's a tutorial I wrote about basic action hooks that might help you:

  7. Alpinegirl
    Posted 12 months ago #

    That's wonderful! Many thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.