go41

Re: Arthemia Premium Category Order :: Reply by Joern

von Joern am 28. Sep. 2010 | Keine Kommentare

that’s quite difficult here, as you select the categories in admin panel and for display these settings are taken from the theme settings ‚ar_categories‘
The list of categories in admin panel is almost not to sort as get_categories is only to sort by:

orderby

(string) Sort categories alphabetically or by unique category ID. The default is sort by Category ID. Valid values:

* id

* name – default

* slug

* count

* group

source: http://codex.wordpress.org/Function_Ref … categories
to change the order of display in admin -> means also the order drawn from settings, you could try to add the orderby parameter in functions.php

around line 405ff you find

<?php

$cp_categories = get_categories(‚hide_empty=0‘);
foreach ( $cp_categories as $b ) {
$cp_cat[] = array( $b->cat_ID, $b->cat_name );
}
try to add &orderby=ID -> get_categories(‚hide_empty=0&orderby=ID‘)

should look like this:

<?php

$cp_categories = get_categories(‚hide_empty=0&orderby=ID‘);
foreach ( $cp_categories as $b ) {
$cp_cat[] = array( $b->cat_ID, $b->cat_name );
}
now the order in admin panel should change and save like this to be shown like this.
Easier might be to forget the settings in admin and go back to the code of arthemia free

here you add your categories in index.php here:

<?php $display_categories = array(5,6,7,8,11); $i = 1;
foreach ($display_categories as $category) { ?>
in Arthemia Premium it’s in header.php

<?php $postcat = get_settings( "ar_categories" );
if( $ar_categories == 0 ) { $ar_categories= $cp_categories->cat_ID; }

if( ! is_array( $postcat ) ) {
foreach ( $cp_categories as $b ) {
$postcat[] = $b->cat_ID;
}
}

$postcat = array_slice($postcat, 0, 5);

foreach ($postcat as $cp_pC ) { ?>
$postcat is trying to get the array of categories.
you could get it easier by changing all this above to:

<?php

$postcat = array(5,6,7,8,11);

foreach ($postcat as $cp_pC ) { ?>
now set 5,6,7,8,11 to the category IDs you had in free version
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 4 weitere Ergebnisse dieses Threads:

Arthemia Premium Category Order

28. Sep. 2010 (von: feejss)

Hello,Thanks for all your great help so far!I have Arthemia premium and I want to change the order of the categories in the category bar. For example, I would like "planning" to come first. It was fairly simple in the…

Re: Arthemia Premium Category Order :: Reply by feejss

28. Sep. 2010 (von: feejss)

Amazing! You are awesome.I did the last suggestion and it worked perfectly. Weiterlesen →

Re: Arthemia Premium Category Order :: Reply by Joern

28. Sep. 2010 (von: Joern)

I forgot to say:If you are able to edit files, it might be better to stay with the free versionArthemia Free is much easier to handle____________________you find me on Google+, Twitter and Facebook Weiterlesen →

Re: Arthemia Premium Category Order :: Reply by feejss

28. Sep. 2010 (von: feejss)

I don't have any coding skill (I can copy and paste) and the free version was giving me all kinds of trouble.I figured out everything I wanted to know in the premium version (except for the category order). Thanks again!…

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: