WordPress.org

Forums

Simple User Listing
[resolved] Shortcode for custom search (by a meta field) (8 posts)

  1. bogdansc
    Member
    Posted 1 year ago #

    Hi,

    I created the search-author.php as you instructed in the FAQ section of your plugin to search users by a custom field in their profile. What is the shortcode to use for this custom search?

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

  2. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    There is only the one shortcode: [userlist]

  3. bogdansc
    Member
    Posted 1 year ago #

    In that case, what modifications must be done (besides adding search-author.php and adding the other piece of code to functions.php) so that the new search by custom field to appear?

    At the moment, on the page where the shortcode is inserted, I still have the old search, the search by name.

  4. bogdansc
    Member
    Posted 1 year ago #

    Sorry. Solved. I was putting the search-author.php in the root folder of the plugin, not in the templates folder. My bad.

  5. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Glad you solved it. The basic how-to for customizing the templates is covered on the main plugin page: http://wordpress.org/plugins/simple-user-listing/

  6. bogdansc
    Member
    Posted 1 year ago #

    Also, I'm curious of something. Is there a way to search through two custom fields, and not just one?

  7. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Yes it is possible. You just have to manipulate the user query arguments appropriately.

  8. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    For future readers, setting up a search by a meta field is covered in the FAQ.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple User Listing
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic