How to update old member directories links with the search query
Unfortunately, old member directories' user search links stop working with version 2.1.0. You need to change them manually so that they continue their proper work with the search. We have prepared a small snippet that will help you find pages containing search links.
The following will describe the procedure for changing links that will continue to work after installing Ultimate Member version 2.1.0.
For example, you have this search link at your site {site_url}/members/?description=test&country=United+Kingdom&members_page=2&um_search=1
Let's make this old link compatible with the 2.1.0 version.
- You could remove
&um_search=1
part of the link - it's not required since 2.1.0 - You need to know your member directory hash key to make the right search link. This is a 5 character hash to determine the current directory. Please visit the Members page after the upgrade and try to make search, filtering or pagination. There will be the 2nd part of a query value:
- after the search by "test" value:
{site_url}/members/?search_{hash}=test
- after the filter by "Country" meta as "United Kingdom" value:
{site_url}/members/?filter_country_{hash}=United%20Kingdom
- after the pagination:
{site_url}/members/?page_{hash}={page number}
- after the search by "test" value:
- When you know your member directory hash (e.g.
ed5d2
) please separate filter types to the correct variables in the query. There were 2 filter types until 2.1.0 version: text and dropdown. All dropdown filters just will have another key in the query, but all text filters should be combined in one general search variable in the query.
"Description" filter - is text filter and "Country" filter - is a dropdown in the link above. So please use the "Description" value in the search query variable and the "Country" value in the filter query variable. If the member directory hash is "ed5d2"
description=test
>search_ed5d2=test
country=United+Kingdom
>filter_country_ed5d2=United%20Kingdom
- The same changes for pagination attributes with using member directory hash:
members_page=2
>page_ed5d2=2
Finally this link {site_url}/members/?description=test&country=United+Kingdom&members_page=2&um_search=1
will look for member directory with hash "ed5d2" {site_url}/members/?search_ed5d2=test&filter_country_ed5d2=United+Kingdom&page_ed5d2=2