PErmalink Error

This topic contains 2 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9956
    praticamente
    praticamente
    Participant

    in the results there is a permalink error, every permalink have a ”/0/”

    should be http://sitename.com/post

    now i have http://sitename.com/0/post

    so when i click on the result i have a 404…

    this appened only in frontend, in the search template preview everityng is ok

    Attachments:
    You must be logged in to view attached files.
    #9958
    praticamente
    praticamente
    Participant

    soved adding

    add_filter( ‘asp_results’, ‘asp_try_fixing_url’, 10, 1 );

    function asp_try_fixing_url( $results ) {
    foreach ($results as $k => &$v) {
    $v->link = str_replace(‘/0/’, ‘/’, $v->link);
    }
    return $results;
    }

    in function.php

    thanks

    #9959
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘PErmalink Error’ is closed to new replies.