troubleshooting Question

Want to Display All Categorys on a Page in Wordpress with Image, Title, Description, Link

Avatar of Jon Imms
Jon ImmsFlag for United States of America asked on
HTMLPHPWordPress
2 Comments1 Solution538 ViewsLast Modified:
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

<?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
dcowley

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros