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

    Hello,

    to remove time (not date) in sidebar widgets “Enfold Latest News” and “Enfold Latest Portfolio” I tried the following code in Quick CSS:

    #portfoliobox-3 .news-time {
        display: none;
    }
    

    and

    #portfoliobox-4 .news-time {
        display: none;
    }
    

    and in functions.php:

    function custom_widget_time($time_format, $location) {
    	$time_format = get_option('date_format');
    	return $time_format;
    				
    }
    add_filter('avia_widget_time', 'custom_widget_time');
    

    It removes the time, but it shows a warning as well: Warning: Missing argument 2 for custom_widget_time() in /home/www/examplepage/wp-content/themes/enfold/functions.php on line 522.

    Cannot reproduce, do you have any idea?

    Cheers
    Sophie

    #540544

    Hi Sophie,

    I couldn’t see any error messages like that when logging in to your sites backend, where do you see it?

    Thanks,
    Rikard

    #540603

    Hey Rikard,

    this is because I removed/disabled the code from Quick CSS and functions.php since I had to provide my customer a first insight into his website. I hoped you could help without the code ;-) . Do you want me to add/enable the code to Quick CSS and in functions.php again?

    Cheers
    LeUP

    #541340

    Hi,

    Isn’t hiding it with CSS enough? And yes, we would need to see the code/error message.

    Regards,
    Rikard

    #541960

    Hey Rikard,

    no, it isn’t enough hiding with CSS only. Would be great if you could have a look at the error message. Login details attached. Thank you in advance.

    Cheers
    LeUP

    #543551

    Hey!

    Please turn off debugging mode by referring to this post – https://codex.wordpress.org/WP_DEBUG

    Regards,
    Yigit

    #543806

    Dear Yigit,

    thanks for your reply. The debugging mode is already turned off!!
    Please see the attached private message showing up the wp.config.php file.

    Do you have any solution for this error?

    Thank you and best regards
    LeUP

    #544070

    Hi,

    Where are you seeing this error message? I can’t see any error messages at all in the back- or front-end of your site?

    Best regards,
    Rikard

    #544122

    Hello Rikard,

    thank you for your reply.
    I send you via private message the some links where you can see the error on right sidebar of each site.
    Please have a look and tell what to do.

    Thank you and brgds.

    LeUP

    #544455

    Hi!

    I changed the code to following one

    function custom_widget_time($time_format) {
                    $time_format = get_option('date_format');
                    return $time_format;                                  
    }
    add_filter('avia_widget_time', 'custom_widget_time');

    Please review your website now

    Regards,
    Yigit

    #544475

    That’s awesome! Thank you, Yigit!

    Regards
    LeUP

    #544477

    Hi!

    You are welcome, glad we could help :)

    Regards,
    Yigit

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Remove time (not date) in sidebar widgets („Enfold Latest News/Portfolio“)’ is closed to new replies.