Viewing 15 replies - 1 through 15 (of 17 total)
  • just copy-paste posts content to all language versions but do not translate them!
    B-)

    suggest feature: an option (checkboxes) to choose which post type include to translate filter system (all other will be exclude). b’cose described “solution” above require a lot of unnecessary work.

    Plugin Author Chouby

    (@chouby)

    It’s true that I did not foresee such usage, which is (I guess) not very common.

    Thread Starter jukselapp

    (@jukselapp)

    Thanks for answer!

    Yeah i figured out that solution, but since i have many people writing on my page this wont be smood enough. There should be an option “all languages” for posts and stuff:)

    Plugin Author Chouby

    (@chouby)

    It is not clear for me how to implement this as today the language you set for the post determines the theme language when you display it. However I will try to find a way for a future release…

    Thread Starter jukselapp

    (@jukselapp)

    That would be awsesome! If you remember, you could bump this post if you manage to fix the problem. I really need a good plugin on this:)

    Thanks!

    Plugin Author Chouby

    (@chouby)

    Finally I included the functionnality in V0.5. However it is disabled by default. Please read the FAQ in the documentation included with the plugin to know how to enable this.

    Thread Starter jukselapp

    (@jukselapp)

    Nice! I will try it out right a way!

    Thread Starter jukselapp

    (@jukselapp)

    I got some problems with the menus not changing at all (Maybe its my theme?). Also the slide with the news on the top of the front page disapears. (jurddabeassi.no)

    Thread Starter jukselapp

    (@jukselapp)

    But everything else works great by the way. Nice job!

    Plugin Author Chouby

    (@chouby)

    For the menus, it’s not normal. Did you create one menu for each language and set the theme location in the menus tab of the language settings page ?

    For the slide, I would like to know how it is set. Is it included in your theme or in a plugin?

    Thread Starter jukselapp

    (@jukselapp)

    Yes I did that for the menus. But nothing happened, it only shows the original menus, and if I delete them it doesn’t show anything. It’s like the configuration in the language setting page doesn’t affect at all.

    The slide is a part of the theme (https://wpshower.com/themes/sight/).

    Plugin Author Chouby

    (@chouby)

    Fifty – fifty. The problem for the menu comes from your theme, and the problem for the slider comes from Polylang…

    I propose you the following modifications:
    In the file header.php of your theme, line 46, replace:
    <?php wp_nav_menu(array('menu' => 'Top menu', 'theme_location' => 'Top menu', 'depth' => 1, 'container' => 'div', 'container_class' => 'menu', 'menu_id' => false, 'menu_class' => false)); ?>
    by
    <?php wp_nav_menu(array('theme_location' => 'Top menu', 'depth' => 1, 'container' => 'div', 'container_class' => 'menu', 'menu_id' => false, 'menu_class' => false)); ?>

    Line 50, replace:
    <?php wp_nav_menu(array('menu' => 'Navigation', 'theme_location' => 'Navigation', 'depth' => 2, 'container' => 'div', 'container_class' => 'nav', 'menu_class' => 'dd', 'menu_id' => 'dd', 'walker' => new extended_walker())); ?>
    by
    <?php wp_nav_menu(array('theme_location' => 'Navigation', 'depth' => 2, 'container' => 'div', 'container_class' => 'nav', 'menu_class' => 'dd', 'menu_id' => 'dd', 'walker' => new extended_walker())); ?>

    I believe that it is not a good idea to specify the menu when calling wp_nav_menu in themes… Well to be honest, there is a possibility to modify polylang and not the theme (which might work for you) but I fear to break something else for other users…

    In the file core.php in polylang/include/, line 267, replace:
    if ($query->is_home && $this->curlang && !isset($qvars['post_type']))
    by
    if ($query->is_home && $this->curlang && (!isset($qvars['post_type']) || $qvars['post_type'] != 'nav_menu_item'))

    and then go back to the line 234, just above the comment line
    // sets the language for posts page in case the front page displays a static page
    and add the following code:

    // sets is_home on translated home page when it displays posts
    if (!$this->page_on_front && $query->is_tax && count($query->query) == 1) {
    	$query->is_home = true;
    	$query->is_tax = false;
    }

    I will add these modifications (or better) to the next release.

    Just for information… I did my first test with WordPress 3.3 and your theme looks broken… So take care when you will update. I hope that the theme will be updated. Everything should be OK with WordPress 3.2.1 with which I tested the modifications proposed above.

    Thread Starter jukselapp

    (@jukselapp)

    I got everything (expet the slide) to work by modifying the theme as you wrote. It’s great, just what I needed. Now I just have to find out how to still have a slide on the top:)

    Thanks for helping me out!

    Plugin Author Chouby

    (@chouby)

    The slide does not work with the modifications made to core.php file ? It’s curious, it works perfect for my test site on all home pages.

    Of course you must set the language of the post and it will appear only on the homepage in that language. Otherwise, if you want that a post appears on all homepages, then you have to set PLL_DISPLAY_ALL to true as explained in the documentation. In that case the slide should show posts with the page’s language and undefined language.

    Plugin Author Chouby

    (@chouby)

    I forgot… Your theme will not be broken with WordPress 3.3. It was broken on my (v3.3) test site, just because the wordpress debug mode was active. Sorry for the bad information.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Polylang] I want to translate everything but not the posts’ is closed to new replies.