• Hello, it is compatible with Polylang or WPML plugin? Thank you.

    With function like below you can get ID of translated page id

    function get_page_language_by_id( $id, $return_original_if_missing = true ) {
        if ( function_exists( 'pll_get_post' ) ) {
            return ( $ppl_id = pll_get_post( $id ) ) ? $ppl_id : ( ( $return_original_if_missing ) ? $id : '' );
        } else if ( function_exists( 'icl_object_id' ) ) {
            return icl_object_id( $id, get_post_type( $id ), $return_original_if_missing );
        }
        return $id;
    }
    • This topic was modified 4 years, 4 months ago by Hrohh.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Hrohh

    (@hrohh)

    Also please
    <p><?php _e( ‘Select the page to display the archive for each of your post types.’, ‘post-type-archive-pages’ ); ?></p>

    This is just the feature I was looking for! Can I add that code to plugin myself somehow?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘compatibility Polylang’ is closed to new replies.