Developer Docs
Add Ons & Tools Automatic Translation Developer Docs FAQ Getting Started Licence & Support MultilingualPress 3 & 4 WordPress Multisite 1x1
How to assign a language via WP-CLI
Starting from MultilingualPress version 4, assigning a language to a subsite through WP-CLI is possible. Open your shell and go to the WordPress directory where the MultlingualPress plugin is installed
How to translate Taxonomy Slugs
In this brief tutorial we show how to translate taxonomy slugs using the multilingualpress.filter_term_public_url filter hook available in MultilingualPress. Set the environment for our example code snippet Here below we
How to run code when the “Copy source content” option is checked
In this tutorial we are going to show how to run your code snippet when the option Copy source content is selected in the translation metabox. The translation metabox A
How to create a custom language switcher in MultilingualPress
In this tutorial we will create a custom language switcher using the MultilingualPress API. We will start creating a simple language menu and then convert it to a select dropdown.
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
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
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
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)