wordpress - To get the category from the post list page -


i category name , got array

array ( [0] => stdclass object ( [term_id] => 4 [name] => cinematography [slug] => cinematography [term_group] => 0 [avhec_term_order] => 1 [term_taxonomy_id] => 4 [taxonomy] => category [description] => [parent] => 0 [count] => 11 [object_id] => 2526 [cat_id] => 4 [category_count] => 11 [category_description] => [cat_name] => cinematography [category_nicename] => cinematography [category_parent] => 0 ) ) 

for wrote

  $category = get_the_category();   print_r($category); 

now how can store "[name] => cinematography" in variable.

i assume $category array got there, then

$cinematography = $category[0]->cinematography;

https://drupal.org/node/1245956


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -