Support » Plugin: Polylang » Polylang and custom post types

  • Resolved RavanH

    (@ravanh)


    Hi Chouby & others,

    Could anyone tell me how to approach this issue? Can I use Polylang in conjunction with custom post types that are either pre-existant / defined in the theme or defined via any of the custom post type plugins. I noticed that WPML and the Types plugin are compatible (same author) so I am hoping there is a similar ‘easy’ solution or combination to be found for Polylang…

    It may be hard to say something about this without a concrete case but a general hint about which route to take here would already be very helpful 🙂

    Thanks!

    http://wordpress.org/extend/plugins/polylang/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Chouby

    (@chouby)

    Hello!

    You just have to register your post type as usual for example in a function hooked to the ‘init’ action. If you register it with ‘show_ui’ set to true, then it is automatically created with multilingual support.

    Otherwise, you can use the ‘pll_get_post_types’ filter to add multilingual support to a post type with ‘show_ui’ set to false (or to remove multilingual support to a post type with ‘show_ui’ set to true).

    I don’t know the plugin ‘Types’. How ‘easy’ is the integration of Types with WPML?

    If you register it with ‘show_ui’ set to true, then it is automatically created with multilingual support.

    Fantastic!

    use the ‘pll_get_post_types’ filter

    Also at init or is a later point also possible?

    I don’t know the plugin ‘Types’. How ‘easy’ is the integration of Types with WPML?

    No idea, just read that it is compatible (which is no surprise since both are by the same dev)…

    Plugin Author Chouby

    (@chouby)

    The ‘pll_get_post_types’ filter is called in a function hooked to ‘wp_loaded’, so I expect that it is used in a function hooked to ‘init’.

    Anywhere before wp_loaded gets fired then… Thanks for the tips and help 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Polylang and custom post types’ is closed to new replies.