Skip Navigation

This topic contains 0 reply, has 1 voice.

Last updated by radmiloP 1 year, 3 months ago.

Assisted by: Mateus Getulio.

Author Posts
March 6, 2024 at 1:55 pm #15379747

radmiloP

Hello,

im creating a custom functionality that is triggering on trash/untrash/delete and need to switch language and then do trash/untrash/delete of that post. The problem is that im always getting the english version of the post. For lng switching im using

global $sitepress;
$sitepress->switch_lang($post_language);

checked, post_language is returning good string 'es'. Am i missing something?

Things to mention, im using this on multisite, and switch_to_blog is working fine

The topic ‘[Closed] custom functionality help’ is closed to new replies.