• Resolved max.eclairs

    (@maxeclairs)


    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,

    https://www.ads-software.com/extend/plugins/simple-user-listing/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter max.eclairs

    (@maxeclairs)

    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?

    Plugin Author HelgaTheViking

    (@helgatheviking)

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

    https://www.ads-software.com/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.

    Plugin Author HelgaTheViking

    (@helgatheviking)

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

    Thread Starter max.eclairs

    (@maxeclairs)

    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.

    Plugin Author HelgaTheViking

    (@helgatheviking)

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

    Thread Starter max.eclairs

    (@maxeclairs)

    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,

    Plugin Author HelgaTheViking

    (@helgatheviking)

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Author post’ is closed to new replies.