MultilingualPress
Add Ons & Tools Automatic Translation Developer Docs FAQ Getting Started Licence & Support MultilingualPress WordPress Multisite 1x1
-
How to copy post meta to the remote sites
This code snippet shows how to copy post meta to the remote site(s). In the example it gets the value of yoast_wpseo_title post meta from the request and then updates the value in the connected sites. add_action('multilingualpress.metabox_after_relate_posts', function($context, $request) { // get post meta value from source site $yoastWpseoTitleValue = (string)$request->bodyValue( 'yoast_wpseo_title', INPUT_POST, FILTER_SANITIZE_SPECIAL_CHARS );…
-
How to programmatically connect content
If you want to connect content programmatically across sites you need to know the IDs of the posts you want to connect beforehand. So let say that we have 3 sites with site ids 1, 2 and 3 and we want to connect a post with the following post ids on each site: post id…
-
How to get connected post IDs by current post ID
To get an array of connected posts you can use the translationIds function. That method is the equivalent of mlp_get_linked_elements in MultilingualPress 2: The first parameter is the source post id, the second is the column “type” in the wp_mlp_relationships table in the database and the third parameter is the source site id. About the type…
-
How to get content translations programmatically
In order to get current content translations of the current post in MultilingualPress, you can use the Translations class passing the arguments via TranslationSearchArgs. Here is an example: add_filter('the_content', function($content) { $args = \Inpsyde\MultilingualPress\Framework\Api\TranslationSearchArgs::forContext( new \Inpsyde\MultilingualPress\Framework\WordpressContext() )->forSiteId(get_current_blog_id())->includeBase(); $translations = \Inpsyde\MultilingualPress\resolve( \Inpsyde\MultilingualPress\Framework\Api\Translations::class )->searchTranslations($args); foreach ($translations as $translation) { $postId = $translation->remoteContentId(); $title = $translation->remoteTitle(); $url =…
-
MultilingualPress-Yoast-SEO-Sync
What is MultilingualPress-Yoast-Seo-Sync for? MultilingualPress-Yoast-Seo-Sync helps you to manage the metadata of the Yoast SEO plugin for translated posts or sites in your MultilingualPress network. The addon provides additional Yoast tabs for every translation in the editor and enables you to set up the data in one place. No more switching between different translations of…
-
How to translate custom post types and taxonomies
In this document we explain you how to translate custom post types and taxonomies in MultilingualPress. To demonstrate it, we’ll create a WordPress Multisite installation with two connected sites. We are going to use the Custom Post Type UI plugin to create a custom post type and a taxonomy. Just keep in mind that the process…
-
MultilingualPress and WordPress 5.0 (Gutenberg)
We are almost there: on 27th of November WordPress will change its editor and it will not be a small change. In fact the new WordPress 5.0 will include Gutenberg in the core. If you are wondering what Gutenberg is, the answer is: a completely new way of writing and processing content in WordPress. The Gutenberg…
-
MultilingualPress 3 (and higher) – Common Questions & Answers
What is the difference between MultilingualPress 3+ & 2? MultilingualPress 3+ is the complete refactoring of version 2. Version 3 (and higher) is only available as a premium plugin and is based on PHP 7. So, it is a state-of-the-art code compatible with the coming Gutenberg editor. For more information check out our documentation What’s…
-
Can I use MultilingualPress in a single-site WordPress installation?
You cannot use MultilingualPress in a single-site WordPress installation. For MultilingualPress you need to have a WordPress multisite installation. Explanation in Detail: Why you can use MultilingualPress only in a WordPress multisite installation To enable the use of MultilingualPress for a single site, we would have to interfere with the way WordPress saves content. However,…
-
Getting started with MultilingualPress
Would you like to create a multilingual website quickly and easily? MultilingualPress (MLP) is the perfect choice. What exactly can MultilingualPress do? MultilingualPress establishes language connections between various pages on a WordPress multisite. This enables you to display content to your website visitors in their language. To do so, you set up each different language…
