Display posts by categories on widget sidebar

Home Forums Gillion Theme Display posts by categories on widget sidebar

Home Forums Gillion Theme Display posts by categories on widget sidebar

This topic contains 7 replies, has 2 voices, and was last updated by  Shufflehound Support 4 days, 10 hours ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    RESOLVED Posts
  • <div class=”comment__body”>
    <div class=”js-comment__body t-preformatted”>

    Hello,

     

    I just bought this theme. I would like to know if the widgets for the blog sidebar “Shufflehound Recent Posts” can show articles only by categories ?

     

    It only offers the option to select “specific posts only”, what i need is by category.

     

    Could you help me with that ?

     

    Thank you in advance

    </div>
    </div>

    Attachments:
    You must be logged in to view attached files.

    Hi @marouane91,

     

    I hope you are well today and thank you for your question.

     

    Currently, that widget doesn’t display article by category.

     

    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. Please see https://themeforest.net/item/gillion-multiconcept-blogmagazine-theme/19470306/support

     

    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

    Best regards,
    Shufflehound team

    Thank you very much for the precious infos !

    You are most welcome here 🙂

    Hello,

     

    I am following up on my previous request, and i want to add these changes through the coding in the page itself.

     

    However, since the files that i need to change are located in subdirectories of the parent theme, like one of them is located at:

     

    inc/widgets/posts-recent/views/widget.php

     

    So i create the same path and file in child theme, but the changes are not taken into consideration.

     

    I searched and i found out that i can make the changes by editing the function present in the file through function.php

     

    But unfortunately, the portion that i need to change isn’t located inside a function.

     

    So how can i make a change for a file like that in my child theme folder ?

     

    I have been realy trying to solve this, so i’m hoping i can get some help from you guys.

     

    Thank you in advance for your support

     

     

    Solution for this topic

    Currently, you can’t overwrite that widget but can create a new one by replicating the existing ‘Shufflehound Recent Posts’.

     

    To do this, copy the whole directory inc/widgets/posts-recent/ into child theme and change the class name and widget title in the file inc/widgets/posts-recent/class-widget-posts-recent.php

     

    Also, change the below path to the child theme in the file inc/widgets/posts-recent/class-widget-posts-recent.php on line number 85

     

      $filepath = get_template_directory().'/inc/widgets/posts-recent/views/widget.php';

    Thank you very much for your answer.

     

    It was surely very helpful for me. I appreciate your support 🙂

    You are always welcome here 🙂

Viewing 8 posts - 1 through 8 (of 8 total)