• Hello and thanks for the awesome plugin, very useful!

    I had to modify it to support WPML so our site will show the proper translated block by the user selected country,

    it will be appreciated if you can adjust the code in order for us and the community to enjoy this feature in future version.

    the change: wrapping the id with wpml_object_id filter.

    /**
     * reblex_get_block function.
     * 
     * @param mixed $id The ID of the reusable block.
     * @return $content The content of the block.
     */
    function reblex_get_block( $id ) {
    	$content_post = get_post( apply_filters( 'wpml_object_id', $id, 'wp_block' ) );
    	$content = $content_post->post_content;
    	return $content;
    }
    /**
  • The topic ‘Support for WPML’ is closed to new replies.