Jon Imms
asked on
Want to Display All Categorys on a Page in Wordpress with Image, Title, Description, Link
I have been trying for a couple of days to make this function work on a website we are building, but it is totally frustrating me.
Basically i want a page on wordpress, which has a list of all the category's on the website, with an image, title, description... much like a standard blog post would be displayed (title,image,excerpt,read- more).
I found the plugin "category-icons" found here Which lets you assign an icon/image to a category. I have been trying to modify the function they suggested though, so i can display the Description, aswell.
Here is the Category page webpage
I'm getting the image, title, and description to display, but only the image links to the actual category. How can add the link to the title also, and if i add a read-more button after the description, that links to the category also.
Basically i want a page on wordpress, which has a list of all the category's on the website, with an image, title, description... much like a standard blog post would be displayed (title,image,excerpt,read-
I found the plugin "category-icons" found here Which lets you assign an icon/image to a category. I have been trying to modify the function they suggested though, so i can display the Description, aswell.
Here is the Category page webpage
<?php
add_shortcode('caticons_listing2','bm_caticons_listing');
function bm_caticons_listing() {
$listing_code = '';
foreach(get_categories("orderby=name&order=ASC&exclude=33") as $category) {
$listing_code .= '<div class="et_pt_blogentry clearfix">' ;
$listing_code .= ''.get_cat_icon("echo=false&cat=".$category->cat_ID).'';
$listing_code .= '<h2 class="et_pt_title">'.$category->cat_name.'</h2><span class="category-description">'.$category->description.'</span>';
$listing_code .= '</div>' ;
}
$listing_code .= '';
return $listing_code;
}
?>
I'm getting the image, title, and description to display, but only the image links to the actual category. How can add the link to the title also, and if i add a read-more button after the description, that links to the category also.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER