WordPress.org

Ready to get started?Download WordPress

Forums

Simple User Listing
[resolved] Author post (8 posts)

  1. max.eclairs
    Member
    Posted 1 year ago #

    Hi, Thanks for this great plugin.

    After the author list is generated and displayed on the search page, each list item shows two links one for the Author name (on top) and at the bottom for the Posts user has created.

    I have created a template for user profile and now the clicking on both links takes me to the user profile page

    I want to ask if there is a method by which, the bottom link should be linked to the post that the user creates and not to the User Profile?

    A quick response will be appreciated.
    Thanks,

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

  2. max.eclairs
    Member
    Posted 1 year ago #

    Got it resolved. Thanks anyways. My next issue is if i want to perform a search based on other user meta data instead of user name, like zip code, city, country, etc. how it should be done?

  3. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    Please see this other thread. enoquenroll is developing a customized search:

    http://wordpress.org/support/topic/add-a-search-custom-users-by-several-options

    Note, there is a bug with pagination on search, but I am working to resolve that sometime in the next few days.

  4. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    PS - Check the updated FAQ. I added an example of how to search by a meta field.

  5. max.eclairs
    Member
    Posted 1 year ago #

    Ok i checked the FAQ. The only thing i wanted to ask after reading this is, how can i add both search fields "search by name" and "search by billing city" or whatever, so that there will be two search fields with two submit buttons. I hope you are getting what I am trying to say.

  6. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    In your theme's search-author.php template, create two forms/inputs, one for each. You will have to adjust the query parameters accordingly.

  7. max.eclairs
    Member
    Posted 1 year ago #

    i have put new input form field in search-author.php. This field will get the zip code from user. I have created a function in functions.php

    //function for searching by zip used in simple user listing plugin
    function get_users_by_meta_data_zip( $meta_value ) {
    
    	// Query for users based on the meta data
    	$user_query = new WP_User_Query(
    		array(
    			'meta_key'	  =>	'_zip',
    			'meta_value'	=>	$meta_value
    		)
    	);
    
    	$users_by_zip = $user_query->get_results();
    
    	return $users_by_zip;
    
    } // end get_users_by_meta_data

    this function returns $users_by_zip which i use in simple-user-listing.php to generate list on the basis of zip code. Everything is working fine. The code is now fetching the users having that zip code in their meta field. But the problem is, whenever i search by putting in some zip code, it shows the result without displaying footer and sidebar of my theme. Can please help me out on this?
    Thanks,

  8. helgatheviking
    Member
    Plugin Author

    Posted 1 year ago #

    If I had to guess, broken markup somewhere in your templates, or funny conditional logic. Sorry, but this amount of customization and theme support is beyond the level of free support I am willing to provide for this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.