hgrg wrote:
Szia!
Elvileg ennek működnie kéne:
wp_list_categories('orderby=id&include=15,12,16,13,17&depth=4'); ?>
Ãgy is próbáltam tegnap, de így a kategóriák ID-jeit emelkedő sorrendbe jeleníti meg.
Én is efelé hajlok,
orderby=id de ez csak arra elég, hogy növekvő sorrendbe tegye őket. Majd pedig ezt az utasítást pedig "figyelmen kívül" hagyja:
include=15,12,16,13,17 (gondolom ez csak arra elég, hogy kizárjuk-megjelnítsünk vele egy adott kategóriát - és ez nem a kategória-sorrendre vonatkozhat)
Próbálom kitalálni a logikáját, kevés sikerrel:
Mi alapján rendezze:
orderby
ID
name - default
slug (ez mi?)
count (ez mi?)
Nekem ugye ID alapján kell, hogy rendezze.
De a
hogyan rendezze? kérdésre, csak ez utasítsát találtam:
order
ASC - (ABC sorrend előre)
DESC - (ABC sorrend hátra)
Kizárást és/vagy megjelenítést találtam még:
exclude -
include = a beírt ID-eket kizárja, vagy csak azokat jeleníti meg
Még amiról fogalmam sincs mi tud, de gyanús:
hierarchical
(boolean) Display sub-categories as inner list items (below the parent list item) or inline. The default is true (display sub-categories below the parent list item). Valid values:
1 (true) - default
0 (false)
number
(integer) Sets the number of Categories to display. This causes the SQL LIMIT value to be defined. Default to no LIMIT.
current_category
(integer) Allows you to force the "current-cat" to appear on uses of wp_list_categories that are not on category archive pages. Normally, the current-cat is set only on category archive pages. If you have another use for it, or want to force it to highlight a different category, this overrides what the function thinks the "current" category is.
Hááát, nem tudom, esetleg még ötlet valakinek?
A beírt ID -ek alapján szerint úgy szeretném megjeleníteni az ID-eket, amilyen sorrendbe én azt beírom.
A wp list pages esetében ezt hogyan oldjátok meg?
Illetve ez mire utasít?
title_li
(string) Set the title and style of the outer list item. Defaults to "_Categories". If present but empty, the outer list item will not be displayed. See below for examples.
Kicsit sok kérdés, sorry :)