lundi 28 mars 2016

WORDPRESS: get_adjacent_post not working after WPML installation

I used the command $adjacent_post_previous = get_adjacent_post(false,'',true) ; to get the next post id and the command $adjacent_post_next = get_adjacent_post(false,'',false) ; to get the previous post id, both for custom post type portfolio, and they worked fine. After I installed the wpml plugin, the first command doesn't work for the translated website, and the second command doesn't work for the initial website. Commands get_next_post and get_previous_post don't word either, but they also didn't work before. I need this to display the next and previous post thumbnail, and all the relative commands need the post id to work. Is there any other way to get the next and previous post id?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire