alhamdi.cs
Member
Posted 7 months ago #
hi
i want to design website using WP let say same as http://www.w3schools.com
you can see in this website that it has diff category for examples
html, xhtml, css, php, javascript
and i want to orginize these category
for example i want to put html and xhtml in one category(for example)
and php in other category
same as the order of w3schools.com on the left side page
can you help me to do that ( im beginner in wp)
thank you
You can allocate posts to categories and create category lists that you can access from your primary navigation menu. See this Codex Article.
HTH
PAE
alhamdi.cs
Member
Posted 7 months ago #
hi Peredur
let say i have two cat parents ( food, countries).
food cat has child ( lunch, dinner, breakfast)
countries cat has childs( Oman, UAE, Qater)
question:
1 -how to show all food childs links if user select the food cat.
2 - how to show all cat that have same parent if usere select one of the child (ex: user click on the oman... the likes that shown will be all cat that has same parent as oman cat )
thanks alot
AFAIK the way to do it is to have the posts in 2 categories (the parent and the child). The posts would then show up in the parent category list and the child list.
HTH
PAE
alhamdi.cs
Member
Posted 7 months ago #
thank you Peredur
but
if i have Parents category (ex: A, B) and
Parent A has child(a1,a2) and
Parent B has child(b1, b2)
i want to list the category in two bar (ex left and right)
each side has all child for one parent
How to do that
how to list the child links for parent that i want
is there a function take for example the parent cat (ex: printchild("A");) and return the child links???
thank you
You have to have a template that does that. It will contain two loops. One that outputs the category list for one category and the other that output the category list for the other, each putting their output into the appropriate area of the page.
To output a category list, you use conditional tags and other tools. For example:
http://codex.wordpress.org/The_Loop
http://codex.wordpress.org/Conditional_Tags
http://codex.wordpress.org/Template_Tags/get_posts
You can even set up custom queries. Whatever suits you best, really. Using get_posts() looks like your best bet to me.
Cheers
PAE