Dravel
Member
Posted 3 months ago #
I been searching for this answer, i have a child-theme set up for my Twenty Twelve and i want to create a page that will list all my categories with the post titles posted in every category, i then want to post that page as a link in the top horisontal menu, how would i do that?
I think you can set up a Custom Menu to include your categories in Appearance > Menus section of the dashboard.
Dravel
Member
Posted 3 months ago #
Hmm, not really what i was after. I want to have a link that leads me to a page where all categories are listed + the post titles. So basiclly i want to create a single page that fetches the categories i have (with post-titles) then have a link to that page in the top menu
For the single page part, you can create a template file in your Child Theme and play about with the category function.
E.g;
<?php
$categories = get_categories();
foreach ( $categories as $category ) {
echo $category->name;
}
?>
Konstantinos Kouratoras
Member
Posted 3 months ago #
You can use shortcodes to display categories posts using "List category posts" plugin.
http://wordpress.org/extend/plugins/list-category-posts/
Dravel
Member
Posted 3 months ago #
That's actually the action i'm after but want to do that without a plugin...
Konstantinos Kouratoras
Member
Posted 3 months ago #
Then, create a new page template, get the categories list with get_categories() and for each category call WP_Query() with category id as argument and list posts.
So you can create a new page in WordPress admin and assign to it the new page template.