Autor Zpráva
J.B.Maco
Profil *
Pomůže mi někdo aby se kategorie neřadili podle abecedy.
<h3>Category Color Assignment</h3>
	<p>Assign color to each category here. You can only assign one color per category. This list below will display all categories you have and the order does not represent the category order in the front page as categories are always sorted alphabetically.</p>

	<table width="100%" cellspacing="2" cellpadding="5" class="editform form-table">
	<?php
		
		$cp_categories = get_categories('hide_empty=0');
        $cp_numCats = 0;
		foreach ( $cp_categories as $b ) {
			$cp_Colorcat[] = array( $b->cat_ID, $b->cat_name );
            $cp_numCats ++;
		}
		
        cp_th( "Category Spoilers Title Color" );
        cp_input( "cp_catColor", "smalltext", "Text (start with #)", get_settings( "cp_catColor" ) );
        cp_cth();
        
		cp_th( "Category Bar Colors" );
		for( $cp_x = 1; $cp_x <= $cp_numCats; $cp_x ++ ) {
		
        cp_select ( "cp_colorCategory_" . $cp_x, $cp_Colorcat, get_settings( "cp_colorCategory_" . $cp_x ), "" );
		echo '<br />'; cp_input( "cp_hexColor_" . $cp_x, "smalltext", "Background (start with #)", get_settings( "cp_hexColor_" . $cp_x ) );
		cp_input( "cp_textColor_" . $cp_x, "smalltext", "Text (start with #)", get_settings( "cp_textColor_" . $cp_x ) );
        cp_input( "cp_hoverColor_" . $cp_x, "smalltext", "Link Hover (start with #)", get_settings( "cp_hoverColor_" . $cp_x ) );
        echo '<br />'; }
		cp_cth();
    	
	?>
Tori
Profil
Jak vypadá funkce get_categories?
Podle čeho je chcete řadit (ID, datum, náhodně, ...)?
J.B.Maco
Profil *
Tori:
Já bych je nechtěl řadit vůbec, jedná se totiž o WP šablonu. Když si kategorie uspořádám (tím že natvrdo přepíšu názvy) a mám je jak chci vše je ok, jakmile ovšem potřebuji něco změnit a dám save seřadí mi to ty kategorie podle abecedy. Nejraději bych byl kdyby to neřadilo vůbec. Dík moc. J.B.Maco

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0