edit:
so i’m using plugin category magic. plugin works like that you add three digits (‘x’,’y’,’z’)
x is first category
y is second and
z is number of post i want to show.
So i have one constant category ‘x’ and 50 different so for each of those 50 categories i have one post that are also in ‘x’ category. And i want when i’m on website.com/category/category-y to be able to read automaticly id of category ‘y’ and to add to plugin query and plugin will show me link to post that is related to category ‘x’ and also to current category ‘y’
Simply rearrange like this
<?php
$categorylist = "";
foreach((get_the_category()) as $category) {
$categorylist .= $category->term_id . ' ';
}
glmdobcatranpost('21',$categorylist,'2'); ?>
wow!
thank you this works great.
I know was possible but my knowledge of php is bad.
Interesting, now works perfect, if doesn match two categories i dont get any result. it’s excellent.
You’re welcome. Your problem description was pretty good. I don’t think I’d do nearly as well asking a technical question in a language other than my native English. I’d probably even mess it up in French. And someone would have to tell me to go look in the manual 🙂