TranslatePress makes it really easy to translate only certain pages or exclude content from translation.
The Do not translate certain paths feature can be used to:
This feature can be accessed by going to Settings → TranslatePress → Advanced tab → Exclude Strings → Do not translate certain paths
With the URL paths feature, you can use the Exclude Paths From Translation option to exclude certain content from translation by entering its URL path. When adding a URL path, you have three options to target content:
*
) to target multiple pieces of content that match. For example, entering /blog/*
would target every piece of content that has /blog/
as its root, including /blog/post-1/
, /blog/post-2/
, etc.{{home}}
to target your homepage.TranslatePress will disable translation and hide the language switcher for any content that matches the URL paths that you enter.
In addition to excluding content by its URL path, TranslatePress lets you only enable translation for specific content by its URL path using the Translation Only Certain Paths option. This is a good option if you only want to include translation on a few pages on your site and want to disable translation everywhere else.
You can use all the same URL path options that you get for excluding content. The only difference is that you’ll select Translate Only Certain Paths when adding the URL paths:
TranslatePress will enable the translation and show the language switcher only for the content that matches the URL paths that you enter.