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

    Hello,

    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!

    #244743

    Hi hypermediamarketing!

    1) Please use the code I posted here: http://www.kriesi.at/support/topic/remove-dates-displayed-in-child-latest-news-widget/#post-241094 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: http://wordpress.org/plugins/simple-image-sizes/ to increase the widget preview thumbnail size.

    Regards,
    Peter

    #245397

    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?

    #245528

    Hi!

    Actually the date & time output uses the same code & filter. The code I posted here: http://www.kriesi.at/support/topic/remove-dates-displayed-in-child-latest-news-widget/#post-241094 should remove the date & the time.
    Cheers!
    Peter

    #245572

    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>
    
    #245589

    Hi!

    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>";
    

    Cheers!
    Peter

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

You must be logged in to reply to this topic.