• Hey, I have a website with 5 different languages and the plugin is working great so far but I have a custom post type called “project” and it creates a portfolio in all different home pages and I wonder if I can disable Polylang for that post type because it only contains information in 1 language (english) but I want the information to be see in all 5 languages without having to make multiple copies of the posts. Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello inthujan, i need that too, you figure out?

    Thread Starter inthujan

    (@inthujan)

    Hey. I did come up with a fix for it after reading the Polylang dokumentations for a couple of hours, but I wouldn’t say it’s the best way to do it.

    Here is a pastebin link to the little plugin I wrote.
    https://pastebin.com/VBxahacT

    I’ll try to explain what it does.

    It selects all ID from the database where the post-type is “project”. And then I use Polylangs function to change the IDs language to what the default language is. That way, the project posts will be visible all languages.

    So if a user is browsing the website in Swedish, every “Project” posts will be set to Swedish and when the user switches to a different language, so will the every “project” posts.

    Pretty simple. You’ll probably have to change a few things in the code to make it work for you. I’m a beginner when it comes to PHP so please feel free to reply with improvements ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable Polylang on a custom post type’ is closed to new replies.