• ok, hope that make sense,
    I have categories that are created dynamically by my users or the system, exemple are category “foto in cancun”, the word cancun may change for whatever place, but the categories will always include “foto in”.
    the question is how to create a specialized template for all category that have the words “fotos in” but also something else.

Viewing 1 replies (of 1 total)
  • Saw this somewhere in the forum (I think from t31os_) that lists categories ‘like’

    $categories = get_terms('category', 'name__like=foto in%');
    //$categories = get_terms('category', 'name__like=FOTO INA%');
    if ($categories) {
    	foreach($categories as $category) {
    		echo '<p><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></p> ';
    	}
    }

Viewing 1 replies (of 1 total)
  • The topic ‘is_category ( when category are created dinamically but have a word in common)’ is closed to new replies.