Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #244450


    we would like to edit the Latest News widget and to ensure edits won’t get overwritten with new theme updates. We have already installed a Child Theme but cannot figure what include files need to be copied over so class-framework-widgets.php edits would take place.

    What we want to do is remove the dates (yes this can be done with css) and make the images bigger (up from the 36 pixels).

    Thank you!


    Hi hypermediamarketing!

    1) Please use the code I posted here: and place it into the child theme functions.php

    2) To increase the size of the image use this css code:

    .image_size_widget .tweet-thumb img, .image_size_widget .news-thumb img {
    width: 36px;
    height: 36px;
    .image_size_widget .news-thumb {
    height: 44px;
    width: 44px;

    You can also use a bigger thumbnail size but then you must install a plugin like: to increase the widget preview thumbnail size.



    Thank you for your answer, this solved 2/3 of the issues!

    How can we remove the time from the widget as well? As a quick fix using

    .image_size_widget .news-time {
    display: none;

    but is there a hook we can use much like for the date?



    Actually the date & time output uses the same code & filter. The code I posted here: should remove the date & the time.


    Hi again!

    I don’t know if it’s our version of the setup or what but it’s only removing the date.

    Set up:
    Version: 2.5
    Installed: enfold
    AviaFramework Version: 1.8.6
    AviaBuilder Version: 0.5

    Before custom code:

    <span class="news-time">February 5, 2014 - 1:23 am</span>

    After adding to functions.php:

    function change_avia_date_format($date, $function) {
      return false;
    add_filter('avia_widget_time', 'change_avia_date_format', 10, 2);

    this is what we get:

    <span class="news-time">1:23 am</span>


    Ok, I think I found the problem. We’ll fix it with the next update. For now please hide the time with css or delete this line in enfold\framework\php\class-framework-widgets.php

    echo "<span class='news-time'>".get_the_time($time_format)."</span>";



    Hi, I would like to override this file too, I have an addition to make into the code for the latest news widget, I have only been able to do this by hacking the class-framework-widgets.php file in the parent theme. I did this on a job months ago and updated recently to find my additions were gone. Luckily I had a staging ste which had the additions still in place so was able to replace the code again, it would be great to be able to sort this within the child theme.



    Just copy the whole latest new widget in the child theme’s functions.php file without the function_exist check. That should override the widget on the parent theme.

    Best regards,


    Hope I’m not posting on the wrong thread …

    Is it possible to offset the posts included in the widget? For example, if I use the widget on the home page, I would like it to skip over the first 3 posts because I already have those showing on the page.


    Hi djsparks,

    Which widget are you referring to?

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,


    I’m referring to the widget this thread is about, the Latest News widget.

    Thank you!


    Hi djsparks,

    Well, you’ll need to modify the code of the avia_newsbox widget. There is no easy snippet that can do that, unfortunately.

    If you need further assistance please let us know.
    Best regards,

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.