• Resolved pmbs

    (@pmbs)


    Hello,

    After I changed my permalinks to pretty (http://domain.com/%postname%/) the WP SmartSort-addon won’t do the job.

    When you enter a category or tag page the default sort works, but when you try to change to another sort option from the drop down list, the url will change to domain.com/category/playstation-3/sort/_post_title-pp-asc/ and you get an 404 error.

    Anyone know a solution? 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same problem here… any luck?

    Thread Starter pmbs

    (@pmbs)

    Nope, not yet. Still hoping!

    Yeah it works on default permalinks, but not SEO friendly ones. A fix would be nice…

    Thread Starter pmbs

    (@pmbs)

    Yup. Tried to look into it myself, but not to experienced.

    If anyone could make a fix for me (and others), take contact.
    I am willing to make a donation/pay a minor fee for it.

    I found a solution!
    Using the following code, you can keep your current “fancy” permalinks, but let wp-smart-sort use “ugly” ones.

    1. Open /wp-content/plugins/wp-smart-sort/wp-smart-sort.php
    2. Go to line 257 and find:

    if ($this->ss_use_permalinks()) {
                        $option['asclink'] = $this->ss_get_current_context_url() . 'sort/' . $option['nicekey'] . '-asc/';
                        $option['desclink'] = $this->ss_get_current_context_url() . 'sort/' . $option['nicekey'] . '-desc/';
                    }

    3. Replace with:

    if ($this->ss_use_permalinks()) {
                        $url = parse_url($this->ss_get_current_context_url());
                        $url = $url['scheme'] . "://" . $url['host'] . $url['path'] . "?" . $url['query'];
                        $option['asclink'] = $url . '&ssort=' . $option['nicekey'] . '&sdir=asc';
                        $option['desclink'] = $url . '&ssort=' . $option['nicekey'] . '&sdir=desc';
                    }

    Example URL output:
    http://your-site.com/category/example/?ssort=_ratings_score-pm&sdir=desc

    It’s not perfect, as the plugin still doesn’t generate “fancy” links, but you can at least get it to work again on your website.

    Thread Starter pmbs

    (@pmbs)

    Cheers mate!

    It’s working, more than good enough! Thanks alot! *hugs* 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 Error with pretty permalinks’ is closed to new replies.