# Setting to include excluded categories in homepage on mobile

**URL:** https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769
**Category:** Feature
**Created:** [9월 28, 2016, 3:00오전 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769 "2016-09-28T03:00:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [9월 28, 2016, 3:00오전 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769/1 "2016-09-28T03:00:43Z")

</div>

Would it make sense to add a setting that only excludes categories from the homepage on desktop clients? Or would this be something that should be handled in a plugin?

Some context: I am building a Discourse site with an un-Discourse-like layout for the topic lists. My layout has a sidebar that lists the latest posts from several categories that are excluded from the homepage. Since the sidebar is only for desktop, topics from the sidebar categories are excluded from mobile as well, and I would like to show them in mobile.

I would be happy to do this within my plugin, if it is doable. I am a newbie in Ruby, but I did find where the [filtering of excluded categories](https://github.com/pmusaraj/discourse/blob/master/app/controllers/list_controller.rb#L63-L65) is done and I tested quickly adding a check for mobile\_view there, and it works. I just added the `unless` statement below:

```
if filter.to_s == current_homepage
  unless view_context.mobile_view?
    list_opts[:exclude_category_ids] = get_excluded_category_ids(list_opts[:category])
  end
end

```

But, help, I don’t know how to do this from within the plugin.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [10월 2, 2016, 11:55오후 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769/2 "2016-10-02T23:55:34Z")

</div>

Following up on this, I did not find a way yet to do this in the plugin. But I am using a small and very temporary patch, available [here](https://dl.dropboxusercontent.com/u/1042893/0002-excluded-categories-in-mobile.patch) if anyone is interested.

It would be nice to have this as a setting though, or at least, know whether the team thinks it’s appropriate for this setting to be in core or not.

---

<div class="post-metadata">

### Author: ![Mans](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@Mans](https://meta.discourse.org/u/Mans)
#### Post date: [10월 12, 2016, 7:55오전 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769/3 "2016-10-12T07:55:02Z")

</div>

> [@pmusaraj](#):
>
> My layout has a sidebar that lists the latest posts from several categories that are excluded from the homepage.

how did you do that?  
I would be thankful if you share the way you list latest posts from other categories in sidebar.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [10월 12, 2016, 4:58오후 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769/4 "2016-10-12T16:58:16Z")

</div>

Using this plugin I just published:

> [@Discourse Sidebar Blocks](https://meta.discourse.org/t/discourse-sidebar-blocks/51457):
>
> warning This plugin is now deprecated. Please use the [Right Sidebar Blocks](https://meta.discourse.org/t/right-sidebar-blocks/231067) theme component instead. This plugin shows a list of blocks as a sidebar on all discovery list pages (latest, new, unread, categories but not on the single topic page). The available blocks at this point (Oct. 12 2016) are the following: multiple category posts (6 items max per category) latest replies (5 items) a custom html block Blocks can be ordered in the plugin settings. Speaking of which, there are these se…

---

<div class="post-metadata">

### Author: ![pinbot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinbot/32/61332_2.png) [@pinbot](https://meta.discourse.org/u/pinbot)
#### Post date: [10월 15, 2016, 12:04오후 UTC](https://meta.discourse.org/t/setting-to-include-excluded-categories-in-homepage-on-mobile/50769/5 "2016-10-15T12:04:52Z")

</div>

I would like to hide specific categories in mobile view
