Support » Plugin: Simple User Listing » Remove Search from list

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    Plugin Author helgatheviking


    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.

    Used your method, its more clean.

    Thanks for the wonderful support.

    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!

    Plugin Author helgatheviking



    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:

    That’s wonderful! Many thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove Search from list’ is closed to new replies.