M.
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Popular Posts] No results in secondary languageHi @hcabrera
Sorry missed that, after adding the lang to the get category, it works fine.
Thank you.
Forum: Plugins
In reply to: [WP Popular Posts] No results in secondary languageHi @hcabrera
Here is the relevant code used for display on page.php of the theme.
Getting the parent categories
$categories = get_terms([ 'taxonomy' => 'category', 'hide_empty' => false, 'parent' => 0, 'exclude' => array(1,7,11,15,53,117,119,221) ]);Gathering the Subcategories
foreach ($categories as $category) ... $sub_categories = get_categories([ 'child_of' => $category->term_id, 'hide_empty' => false, 'orderby' => 'order', 'order' => 'ASC', ]); $sub_cat_list[] = $category->term_id; foreach ($sub_categories as $sub_category) { $sub_cat_list[] .= $sub_category->term_id; }wpp call
$args = array( 'post_type' => 'post', 'cat' => implode(',', $sub_cat_list), 'order_by' => 'views', 'range' => 'last30days', 'limit' => '5', 'pid' => implode(', ', $sticky_posts), 'post_html' => '<li><a class="popular-post" href="{url}">{text_title}</a></li>' ); wpp_get_mostpopular($args);Forum: Plugins
In reply to: [WP Popular Posts] No results in secondary languageHi @hcabrera
Thank you for the update.
I have at this moment 4 languages on my WP, all with translated posts on it. But it seems to still not show any translated posts.
Is there anything i can debug to see why it not working now on version 6.4.2. ?
KR
Forum: Plugins
In reply to: [WP Popular Posts] No results in secondary languageHi Hector
Sorry to bother you, are there any news on this topic, or possibly any “workaround” i can do until its fixed properly?
KR
Forum: Plugins
In reply to: [WP Popular Posts] No results in secondary languageHi Hector
Thanks for the quick reply.
Is there any way i could debug why it does not return any articles?
On the primary language is it quite well working and with the same code as its added in page.php of the theme, it does not return any articles at all in any other language.
All articles have translated articles in the secondary languages, so it should return atleast something, but wpp_get_mostpopular() with above settings does not return anything at all.
- This reply was modified 2 years, 3 months ago by M..