Support » Plugin: Simple Custom Post Order » [bug] get_next_post() and get_previous_post() taxonomy patameters are ignored

  • wube

    (@wujek_bogdan)


    I’ve found a bug.

    get_next_post() and get_previous_post() functions work well as long as they’re used without parameters. If taxonomy parameters are provided, for example get_next_post(true, '', 'my-taxonomy') which should query the next post that belongs to the same taxonomy term as the current one, then a result of a function call is the same as if the function was called without any parameter.

    So, it seems that there’s something wrong with the get_next_post_where and the get_previous_post_where filter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same here. get_adjacent_post() is broken too. Took me like one day to find ou it came from that extension, a fix would be appreciate đŸ™‚

    Possible ugly hack.
    In your template, right before using above broken functions :

    		remove_all_filters('get_previous_post_where');
    		remove_all_filters('get_previous_post_sort');
    		remove_all_filters('get_next_post_where');
    		remove_all_filters('get_next_post_sort');
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[bug] get_next_post() and get_previous_post() taxonomy patameters are ignored’ is closed to new replies.