WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. DeadForce
    Member
    Posted 9 months ago #

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

    Thanks in advance.

    http://wordpress.org/extend/plugins/simple-user-listing/

  2. DeadForce
    Member
    Posted 9 months 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
    Member
    Plugin Author

    Posted 9 months 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
    Member
    Posted 9 months ago #

    Used your method, its more clean.

    Thanks for the wonderful support.

  5. Alpinegirl
    Member
    Posted 8 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
    Member
    Plugin Author

    Posted 8 months ago #

    @Alpinegirl,

    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:
    http://www.kathyisawesome.com/412/thematic-hooks-and-functions/

  7. Alpinegirl
    Member
    Posted 8 months ago #

    That's wonderful! Many thanks!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.