By Alaina Driscoll on Friday, 10 January 2014
Posted in General Issues
Replies 7
Likes 0
Views 599
Votes 0
Hi again,

I'd like to prevent subcategories' posts from appearing in the main category feed. Can you tell me how to achieve this?

Many thanks,
Alaina
Hello Alaina,

Ah, I see. I get what you mean now. Unfortunately there's no configuration for this right now but you can edit the file /components/com_easyblog/views/categories/view.html.php and at line 321 locate the codes below:


$catIds = array();
$catIds[] = $category->id;
EasyBlogHelper::accessNestedCategoriesId($category, $catIds);


Replace it with,


$catIds = array();
$catIds[] = $category->id;
·
Friday, 10 January 2014 22:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alaina,

I am sorry but I am not too sure which section are you referring to here. Would you mind posting a screen shot of this?
·
Friday, 10 January 2014 02:55
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

OK, here is a screenshot attached. I have a main category called "Students" and subcategories of all their grades such as PreK, Kindergarten, 1st, 2nd, 3rd, etc. All the subcategories' posts appear in the Student main category. I would like to prevent that from happening. Thanks!
·
Friday, 10 January 2014 02:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alaina,

Do you mean you want to remove that "Subcategories" line? You can actually do that by editing the file /components/com_easyblog/themes/default/blog.categories.php and remove the codes below at line 59


<?php if(! empty($category->nestedLink)) { ?>
<div class="profile-child ptm small">
<span><?php echo JText::_( 'COM_EASYBLOG_CATEGORIES_SUBCATEGORIES' ); ?></span>
<?php echo $category->nestedLink; ?>
</div>
<?php } ?>
·
Friday, 10 January 2014 11:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Actually no, not the line. I'd like to keep that line.

However, the blog posts of the subcategories is what I'm referring to. I'd like all the posts of subcategories to stay only in the subcategory and not appear in the main/parent category heading.

So for example, if I create a post in the subcategory called "6th", I do not want this post to appear in the parent category "Students".

I hope that makes sense
·
Friday, 10 January 2014 21:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark-- you are the best. Thank you so much for your help!!
·
Saturday, 11 January 2014 00:44
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome Alaina Glad that your issues are resolved now.
·
Saturday, 11 January 2014 14:20
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post