Query based on current issue – how to?
-
I’m building a quarterly literary journal. Unfortunately, I’m not a seasoned PHP guy or familiar enough with the WordPress codex to figure out a simple thing like this. I’ve added issue management, and can get the current ID of the journal by doing this:
[code]$categories = get_categories('child_of=33&number=1&order=desc');
foreach ($categories as $category) {
$currentissue1 = $category->cat_ID;
$currentissue2 = $category->cat_name;
}
[/code]
(33 is the ID of the issue category, which is managed, so doing this will give me the current issue)But then I’m lost on how to cast the array variable as a string to add it to a query loop.
So my question is –
Is there a built-in function for this, and how would I use it?If not, how do I query with the information returned here? Ideally, having an actual variable like $current_issue_id to plug in to queries would be great!
- The topic ‘Query based on current issue – how to?’ is closed to new replies.