WordPress.org

Ready to get started?Download WordPress

Forums

Bogo
[resolved] Custom Post Types? (6 posts)

  1. Darkwing
    Member
    Posted 1 year ago #

    Nice concept so far with Bogo!

    Regrettably it seems not compatible with Custom Post Types. I tried to translate WooCommerce products, but the language selector doesn’t even show up in the editor. Language Switcher Plugin is gray, when viewing products, this means Custom Post Types.

    Bummer. Could have been so nice. ;)

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

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 1 year ago #

    Bogo's localization is only available for Posts and Pages by default, in order to avoid giving unexpected effects on other Post Types. You can change it by utilizing bogo_localizable_post_types filter hook.

  3. Darkwing
    Member
    Posted 1 year ago #

    Ok, glad I’ve asked, good to know, I’ll give it a try sometime.

    Thanks!

  4. jabbo126
    Member
    Posted 10 months ago #

    Ok - i find out that normal posts works fine, but not my custom post type. I just add the title of my custom post type in code of post-l10n-functions.php file in plugin directory on line:

    function bogo_localizable_post_types() {
    	$localizable = array( 'post', 'page', 'news' );

    I added 'news' in it. And it looks like it works, but when i click preview of my translated post in custom post type it gives me 404 error. But with normal post, it works fine. Is there anything els i need to do?

    PS: I tried change permalinks setting, it didn't help.

  5. Jordan Wellington Lint
    Member
    Posted 8 months ago #

    Hello,

    I'm also interest in implement this to my website. Of course, I don't want to modify the plugin. Can I use the bogo_localizable_post_types in my functions? How?

    Thank you!

  6. hiribarne
    Member
    Posted 7 months ago #

    Hello,

    Just a comment to let it clear, it works in your functions.php. Here is a little working example:

    add_filter('bogo_localizable_post_types', 'my_localizable_post_types', 10, 1);

    function my_localizable_post_types($localizable) {
    $localizable[] = 'event';
    return $localizable;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.