Step 1: Check Permalink Structure #
The first step is to check your permalink structure. Set the permalink structure to post name to solve the pagination issue. To do this, go to Settings > Permalinks in your WordPress dashboard and select “Post name” as the custom structure. Make sure not to add a slash at the end of the structure.
Step 2: Display Correct Link #
If changing the permalink structure does not resolve the issue, you can try displaying the correct link. Add a filter to the theme’s functions.php file.
To add the filter, copy and paste the following code into your theme’s functions.php file:
add_filter('wlfmc_user_logged_in_wishlist_url', 'custom_wlfmc_user_wishlist_url');
function custom_wlfmc_user_wishlist_url($old_url) {
return 'https://www.yoursite.com/bookmark_page/';
}
Replace https://www.yoursite.com/bookmark_page with the URL of your wishlist page.
If you are using multilingual plugins, you can use this snippet:
add_filter('wlfmc_user_logged_in_wishlist_url','custom_wlfmc_user_wishlist_url');
function custom_wlfmc_user_wishlist_url()
{
$wishlist_page_id = WLFMC()->get_wishlist_page_id();
return get_the_permalink( wlfmc_wpml_object_id( $wishlist_page_id, 'page', true ) );
}
Step 3: Save Changes #
Once you have added the filter code and updated the URL, save the changes to your theme’s functions.php file. Reload your wishlist page to see if the issue has been resolved.