Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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 shown

    Regards Max

    #942041

    Hey 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,
    Mike

    #942595

    Hi, 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?
    max

    #942880

    Hi!

    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,
    Ismael

    #943652

    Hi
    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
    Max

    #943800

    Hi,
    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,
    Mike

    #944046

    Sure?
    “You can copy the whole combo widget class inside the child theme folder.

    #944054

    OK great – that worked.
    THANKS a lot!
    Kind regards
    Max

    #944062

    Hi,
    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

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Combo Widget – how to limit to certain categorys’ is closed to new replies.