returnin category properties (id, link, etc)
-
Hi,
Ive tried hard to get this… but Im not beeing able to do something I beleive should be simple…
All I want is to retrieve the parent category link of the current post inside The Loop.
I want to do this: “AUTHORs NAME
My last try to get the category id was:
<blackticks>
<? global $id ?>
<?php $query = “SELECT category_id
FROM $wpdb->post2cat
WHERE post_id = $id “;
$categoria = $wpdb->get_results($query);
echo $categoria->category_id;?>
</blackticks>I returns nothing…
any help?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘returnin category properties (id, link, etc)’ is closed to new replies.