Saturday 15 March 2014

wordpress - Adding list of classes to PHP array -


I want to loop the loop through a product categories and store them in an array, Will be assigned as the name of each product for some reasons my code is not working, and there are no PHP errors. Maybe it is a WordPress problem:

  $ classes = Array (); $ Word = get_the_terms ($ post-> id, 'product_cat'); Forex Currency ($ word $ word) {$ squares [] = $ word- & gt; Slug; } & Lt; Li & lt ;? Php post_class ($ square); ? & Gt; & Gt;   

Basically, I am trying to assign classes for the name of the class for my related product. It's not throwing an error, but nothing loads. Does anybody see any issues here?

The array_shift used to break the array has been done for me, but it does not work if $ Cats have diverse classes

  & lt; Php $ classes = array (); $ Word = get_the_terms ($ post-> id, 'product_cat'); Forex Currency ($ word $ word) {$ cats [] = $ word- & gt; Slug; } $ Square [] = intestine ("", $ cats); & Lt; Li & lt ;? Php post_class ($ square); ? & Gt; & Gt;    

No comments:

Post a Comment