Siroj
Forum Replies Created
-
Forum: Plugins
In reply to: [Polylang] [Plugin: Polylang] Translations on homepageThanks again!
That works. Newer and older posts now work in the other languages ??
Forum: Plugins
In reply to: [Polylang] [Plugin: Polylang] Translations on homepageHi,
the code worked, but i later noticed that the link to older en newer posts didn’t work. They just showed the homepage-posts again.
So i searched for solutions.
I found one that worked on the default language homepage. But when i change the language it doesn’t.
I fiddled around with the code but i lack php-skills…
Maybe its just something small… I tried something like this.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=.pll_get_term(4&paged=$paged)");;
Maybe someone sees an obvious mistake…
Forum: Plugins
In reply to: [Polylang] [Plugin: Polylang] Translations on homepage?? Thanks…
That did the trick! Really need to dive into php ??
Forum: Plugins
In reply to: [Polylang] [Plugin: Polylang] Translations on homepageI used different kind of codes.
The kind i posted above didn’t work, also not with you addition.
To get only intro-articles from category 4 (dutch homepage-articles) on the homepage i use this code now:
<?php if ( is_front_page() ) { $cat = pll_get_term($cat); query_posts('&cat=4'); } // end if ?>
That works for the dutch part. But when i click on german it shows the same articles, articles from category 4, then it should show articles from cat 34.
There wasn’t any code in the template for showing specific articles on the frontpage. Thats why i added the code in the first place.
I tried a lot od snippets i found using search, but none worked, some showed me all latest posts in German. But i want only to show from a specific category.
is there a setting or specific way i have to use for the ‘homepage’ in the menu? Hoe does Wordress now its the homepage in another language?
I use a link to the root of the site as the ‘homepage’….
So i would think i needed somethink like
<?php if ( is_front_page() && code for language == nl_NL ){ $cat = pll_get_term($cat); query_posts('&cat=4'); } // end if ?>
and the same snippet for german with de_DE and cat=34
Forum: Plugins
In reply to: [Polylang] [Plugin: Polylang] Translations on homepageHi Chouby,
no, it is a frontpage with intro’s from a specific category. I use https://standardtheme.com the standard theme.
I had to change it a bit for getting the intro to work and to get only intro’s from a specific category.
Forum: Plugins
In reply to: [Polylang] polylang : Warning: in_array() expects parameter 2 to be arrayThanks for your quick response… That worked like a charm!
Forum: Plugins
In reply to: [Polylang] polylang : Warning: in_array() expects parameter 2 to be arrayI have the same error.
This is the line of code:
$is_post_type = isset($qvars['post_type']) && (in_array($qvars['post_type'], $this->post_types) || (is_array($qvars['post_type']) && array_intersect($qvars['post_type'], $this->post_types)) );