Home › Forums › Gillion Theme › Show only one category on widgets/sliders
Home › Forums › Gillion Theme › Show only one category on widgets/sliders
Hello,
I’ve been looking for answer but none of the previous topics solved my issue. Right now all categories are being displayed on the homepage widgets and other sections of the page. Please see attached screenshots.
How can I set only one specific category to show instead of showing all categories? I need this done asap please help.
Thanks
Hi @kmga,
I hope you are well today and thank you for your question.
You can display first category of them by adding the following CSS code in the Custom CSS code option of your theme on the below path.
Admin Area -> Appearance -> Theme Settings -> Custom Code -> CSS Code
.cat-item, .post-categories{ font-size: 0; } .cat-item a, .post-categories a { display: none; } .cat-item a:first-child, .post-categories a:first-child { display: block; }
Best regards,
Shufflehound team
That will show the first category which is likely the first in the alphabetical order. But I would like to pick for the specific category, this is not the solution I need.
In this case, it will show as “Asia” but I want to show the very specific category in this case “Cebu” or “Zambales”. Does it make sense?
To achieve that please use the following CSS code instead of shared above.
.cat-item, .post-categories{ font-size: 0; } .cat-item a, .post-categories a { display: none; } .cat-item a[href*="zambales"], .cat-item a[href*="cebu"], .post-categories a[href*="zambales"], .post-categories a[href*="cebu"] { display: block; }
So I have to do this for all categories I have? I have like 50+ specific categories since these are destinations; cities/provinces.
Can’t you provide a better solution of just being able to choose which category to show on the widgets / pages?
To achieve this, you have to develop custom code in the child theme of Gillion theme.
Developing custom code for custom functionality is beyond the scope of support that we provide here.
If you are not a developer then you can consider hiring a developer to develop it for you. You can hire a developer from any freelance site. Shufflehound recommends the developer https://www.upwork.com/freelancers/~011652ffec8865c6d5
I get it, your theme isn’t capable of this simple functionality. Will add it to my review, thanks anyway.
Actually this is very unique functionality requested first time by you but we will consider this to be implemented in the theme based on the number of requested we get it for this.
This is simple, most of the major themes on themeforest have this. I dont get how you say it was unique when it was necessary for a theme to be able to only show specific category on widgets/pages.
Each posts can have multiple categories, but some are not necessary to be shown. This simple setting is added on the post itself. I’ll look forward to this feature.
Thank you for your feature request.
We will do consider it.
Ok. Thank you for sharing the screenshot.
To remove those commas just change the above shared CSS code as following.
.cat-item, .post-categories{ font-size: 0 !important; } .cat-item a, .post-categories a { display: none; } .cat-item a[href*="zambales"], .cat-item a[href*="cebu"], .post-categories a[href*="zambales"], .post-categories a[href*="cebu"] { display: block; }
I don’t see it on your shared site so could you please share me the exact page URL from your site where it is displaying so that i can help you?
I don’t know in what point this is but I have the same issue and I understand @kmga.
I was going to set widgets with the most popular posts in the website right know. (viewed, commented, etc). Not possible as well, as long as I see. This is really something very commom in every theme on Codecanyon.
Example: I have a lot of posts with infographics, so they have a tag and the category “infographics”. I wanted to show only the posts within this category on the sidebar. I havent found a solution for that. Commonly there’s a widget we can put on the sidebar choosing the category we want to show. This is really basic.
Hi there, I actually need the same thing – the blog items on the homepage to display just specific categories instead of all.
I’ve tried the CSS above but doesn’t work for me (Gillion).
Any recent solutions?
Thank you!
Unfortunately 2 years have passed and still same issue. This has not been resolved and I’m disappointed. This is a simple WordPress feature and I dont know why you can’t make one category “Primary”.