Posted By

zartgesotten on 06/27/09


Tagged

hack wordpress category theme


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

maxvee8
irishsk
joelhaus
lancemonotone
athanassiadis


Wordpress - Get current category name and / or ID


 / Published in: PHP
 

  1. <?php
  2. //AKTUELLE Post-KATEGORIE-ID ermitteln
  3. foreach((get_the_category()) as $category)
  4. {
  5. $postcat= $category->cat_ID;
  6. $catname =$category->cat_name;
  7. //echo $postcat;
  8. }
  9. ?>

Report this snippet  

You need to login to post a comment.