• Resolved ilovetacos

    (@fschall)


    Hey there,

    Thank you for this great plugin. It was just what I was looking for.

    I’m trying to customize the date to display as Dec. 22, 2021 and the date default is Wednesday 22 Dec 2021. Is there a way to do that?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpdever

    (@wpdever)

    Hi,

    You can create a new placeholder with this hook ‘wnbell_content_placeholder’. For your case, you can add this to your theme’s functions.php file:

    add_filter('wnbell_content_placeholders', 'add_new_date_format', 10, 2);
    function add_new_date_format($to_replace, $post_id)
    {
        $new_post = get_post_meta($post_id, "post_id", true);
        $to_replace['{{my_date}}'] = get_the_date('M. j, Y', $post_id);
        return $to_replace;
    }

    Then, in Settings->Notification item, replace {{date}} with {{my_date}}.

    Thread Starter ilovetacos

    (@fschall)

    Sweet! That worked. Thanks so much. Looking forward to using the plugin on other websites.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Customize Date Display’ is closed to new replies.