Adding functionality to CG-SameCat
-
The CG-SameCat plugin is awesome and full of possibilities. Check out a sample page for my problem: https://leftcoastlifestyle.com/blog/fashion/ya-ya-wheat-canvas-jacket/
I have created this code in my single post page:
‘<?php
if (function_exists(‘list_posts_of_cat’))
foreach((get_the_category()) as $cat)
{
{
$catp = list_posts_of_cat(get_the_category(), 10, 0, $post->ID);
if ($catp)
{
echo “<div>”;
_e(“Recent Finds in “);_e($cat->cat_name . ”);_e(“:”);
_e($catp);
echo “</div>”;
}
}
}
?>’And as you can see, it creates two lists, one for each category, but I’m not smart enough to figure out how to either modify that chunk of code or the plugin code to make it create a list relevant to each category, currently it lists the same related items from the first category under each category heading.
I am sure this would be of use to a lot of people. Thanks for any ideas guys…
- The topic ‘Adding functionality to CG-SameCat’ is closed to new replies.