WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #41373, comment 7


Ignore:
Timestamp:
08/02/2017 11:01:01 PM (2 years ago)
Author:
BackuPs
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #41373, comment 7

    initial v1  
    77It also happens in polylang.
    88
    9 Create a category and a translated category. Create a post and assign it to the category. Create a translated post and make sure its assigned to the translated category. In wpml this is done automically.
     9Create a category and a translated category. Create a post and assign it to the category. Create a translated post and make sure its assigned to the translated category. In wpml this is done automatically.
    1010
    11 Then if you would add this code to the archive.php or single post.php you will see the term id in the original default language. But in the translated page it is empty or null.
     11Then create a page and a translated page. Now if you add this code to the page.php where $term_slug='gallery' contains the slugname of the category you created you wil see that in the default language page the echo returns the category ID but in the translated page it is null or empty. In wp 4.7.5 or below it will return the translated category ID.
     12
     13
     14But in the translated page it is empty or null.
    1215
    1316<?php