Forum Replies Created

Viewing 1 replies (of 1 total)
  • Passer

    (@passer)

    In table wp_term_taxonomy with taxonomy=language is stored information about every language, added with plugin polylang.

    And in table wp_term_relationships object_id is your post/page id from table wp_posts and term_taxonomy_id is id of your language.

    So if you want to get all posts for defined language, you can do it with query:

    SELECT p.* FROM wp_posts p INNER JOIN wp_term_relationships r ON r.object_id=p.ID WHERE r.term_taxonomy_id=language_id

    where language_id is id of language you needed.

    Images also stored on wp_posts table with post_type=attachment, so you can manipulate these too.

    I just looked at tables in database, not at code, so I could be wrong with some details.

Viewing 1 replies (of 1 total)