Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #240231

    How can I remove the post dates displayed under the post titles when using a ‘Child Latest News’ widget?
    Also, I am using Enfold child as the active theme. Is there a way to make this change so it doesn’t need to be redone every time the parent theme is updated?

    Thanks,
    Keith Martin
    http://www.LocalCrew.tv

    #241094

    Hi KCMartin91737!

    If you want to remove the date from the widget insert following code into your child theme functions.php:

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

    Cheers!
    Peter

    #241322

    Peter,

    Thanks for the quick response. Unfortunately, when a add that code to the child theme’s functions.php file (themes/enfold-child/functions.php) the website loads as a blank page. When I remove the code, the site/theme loads correctly again. This is repeatable. Any suggestions on how to resolve the issue would be much appreciated.

    I added the code to the functions.php file after the following lines:
    <?php
    /*
    * Add your own functions here. You can also copy some of the theme functions into this file.
    * WordPress will use those functions instead of the original functions then.
    */

    Keith

    #241457

    Hey!

    You can add this on the child theme’s style.css:

    .news-time {
    display: none !important;
    }

    Best regards,
    Ismael

    #241476

    Ismael,

    Tried adding that to the Child theme style sheet and also to the “Quick CSS” area in the Enfold Child Theme Options. Unfortunately, neither worked. You can view the news widget near the bottom of the Home page at

    #241478

    Sorry, 2nd attempt at the URL

    http://www.LocalCrew.tv

    Keith

    #242578

    Hi!

    Please create me an ftp account and post the login credentials as private reply. I’ll add the code I posted here: https://kriesi.at/support/topic/remove-dates-displayed-in-child-latest-news-widget/#post-241094 to your functions.php file. I know that it works because I also use it on my website without problems.

    Best regards,
    Peter

    #243507

    Peter,

    Thanks for the offer to do it for me but it occurred to me my security plugins were likely blocking the functions.php code change. The dates are now gone from the widget but the time is still being displayed. Tried to add a similar line to remove the time as well but haven’t gotten it right yet. What code do I add to remove the time as well?

    Thanks again,
    Keith

    #243508

    Disregard my last message. I got it working now. Thanks again for all the help.

    Keith

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Remove dates displayed in 'Child Latest News' widget?’ is closed to new replies.