Translate a template part on a site using full-site editing.
Our Setup:
1. Our particular site is using a multi-site.
2. We are using two languages: English and Spanish
3. The English site is hidden link
4. The Spanish site is espanol.getphoenixmedicare.com
The Problem:
Using full-site editing, it appears that template parts are not editable via the WPML interface. See "Screen Shot 2022-1026 at 9.12.57 AM.png"
How To Re-Create the Issue:
1. Create a theme that utilizes a template part using full-site editing
2. Use the Full-site editing interface to save a modification of the template part (this will save it to the database) - see Screenshot "full-site-editing.png."
3. There is no way to create a separate translation for another language
How I've gotten around the Issue:
I've noticed that WPML saves a separate post per language for pages, posts, navigation items, etc. (but not post types of wp_template_part that I can see)
1. Duplicate the "post" associated with the template part in the database and note the new post ID. (See database-duplication.png. In this case, we duplicated 13 to make 44 for the Spanish version of the site)
2. Insert a new row into the icl_translations table with the appropriate values (see translations-table.png)
3. Finally, add a row in the term_relationships table associating the new post (44) with the wp_theme taxonomy.
While this makes it "work," it requires one to go into the database and edit the entry directly -- not ideal and error-prone.
We would love to know a way to edit template parts on a per-language basis within the admin.
before your ticket is assigned to one of my colleagues, please allow me to walk you through some initial debugging steps. This will help speed up the support process.
Thanks - I think what was throwing me off is that the "Edit" button under Translation Management doesn't work for templates or template parts (goes to hidden link). However, the translation process outlined in the document you sent worked well.
Thanks for the guidance!
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.