-
AuthorPosts
-
April 14, 2018 at 7:28 pm #942020
Hi, how can we limit the posts shown in “Enfold Combo Widget” to certain categorys?
Example:
Posts from “Books” = shown
Posts from “Prints” = not shownRegards Max
April 14, 2018 at 8:59 pm #942041Hey pixopolis2222,
Looks like you will need to edit core files to do this, please see: https://kriesi.at/support/topic/remove-category-from-enfold-combo-widget/Best regards,
MikeApril 16, 2018 at 2:56 pm #942595Hi, no – there is probably no need to edit the core.
We use a childtheme and since there is a way to disable the comment-section of the “Enfold Combo Widget” via functions.php (Childtheme) there for sure must be a way to exclude certain category-IDs via functions.php too.Can you please provide us with that?
maxApril 17, 2018 at 4:03 am #942880Hi!
You can copy the whole combo widget class (https://pastebin.com/yZjGrEEM) inside the child theme folder. Alter the query of the avia_get_post_list function.
avia_get_post_list('cat=&orderby=comment_count&posts_per_page='.$posts);
In the cat query, add the id/ids of the category that you want to be excluded.
avia_get_post_list('cat=-5,-4,-3&orderby=comment_count&posts_per_page='.$posts);
// https://codex.wordpress.org/The_Loop#Exclude_Posts_From_Some_Category
Best regards,
IsmaelApril 18, 2018 at 4:07 pm #943652Hi
ok – questions:
1: where in the childtheme-folder does the file needs to be saved? (root/ some subfolder?)
2: How does the file has to be named?Kind regards
MaxApril 19, 2018 at 12:47 am #943800Hi,
I’m pretty certain that Ismael means that this code in the pastebin is the class, or function, from the “class-framework-widgets.php” and need to be placed in your child theme functions.php, and then you need to make the changes that he suggested.Best regards,
MikeApril 19, 2018 at 11:30 am #944046Sure?
“You can copy the whole combo widget class inside the child theme folder. “April 19, 2018 at 11:39 am #944054OK great – that worked.
THANKS a lot!
Kind regards
MaxApril 19, 2018 at 11:47 am #944062Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
and the video tutorials here
And if there are features that you wish Enfold had, you can request them and vote the requested ones here
For any other questions or issues, feel free to start new threads under Enfold sub forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Combo Widget – how to limit to certain categorys’ is closed to new replies.