{"id":8434,"date":"2023-08-16T10:50:21","date_gmt":"2023-08-16T17:50:21","guid":{"rendered":"https:\/\/membermouse.com\/?post_type=ht_kb&#038;p=8434"},"modified":"2023-10-27T11:26:03","modified_gmt":"2023-10-27T15:26:03","slug":"anadir-una-fecha-a-las-notificaciones-push","status":"publish","type":"ht_kb","link":"https:\/\/membermouse.com\/es\/docs\/add-a-date-to-push-notifications\/","title":{"rendered":"A\u00f1adir una fecha a las notificaciones push"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When sending out a Push Notification (read this article to&nbsp;<a href=\"https:\/\/membermouse.com\/docs\/using-push-notifications\/\">learn more about Push Notifications<\/a>) you might want to add the date that the email was sent, especially if your Push Notification is serving as any type of a receipt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do this, follow the steps below:<\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Locate and open your theme's functions.php file. &nbsp;As this is very important file, be careful when you are making any changes. We would also suggest copying the original file contents and saving them just in case. <br><br>You can edit this file one of two ways: <br><br>1. Open the functions.php file for your theme in an editor (stored in your current theme folder wp-content\/theme). <br><br>2. Access the file from&nbsp;<em>Dashboard &gt; Appearance &gt; Editor<\/em>; make sure your theme is selected, then click functions.php in the list on the right. If you would like more help on what\/how to edit this file,&nbsp;<a href=\"http:\/\/codex.wordpress.org\/Editing_Files\">please read this article<\/a>.<br><br><\/li>\n\n\n\n<li>Add the following code to the file: <\/li>\n<\/ul>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>function ng_date_shortcode($atts, $content = null) {\nreturn ($content) ? date($content) : date(\"F d, Y\");\n}\nadd_shortcode('curr_date', 'ng_date_shortcode');<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then you can use the shortcode anywhere on your site, including in push notifications: <br><br><code>[curr_date]<\/code><\/li>\n<\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Cuando env\u00edes una Notificaci\u00f3n Push (lee este art\u00edculo para saber m\u00e1s sobre Notificaciones Push) puede que quieras a\u00f1adir la fecha en la que el email fue enviado, especialmente si tu...<\/p>","protected":false},"author":21411,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_strive_editorial_status":"not-started","_strive_copy_of":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"ht-kb-category":[215],"ht-kb-tag":[],"class_list":["post-8434","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-notifications-overview"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/ht-kb\/8434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/users\/21411"}],"replies":[{"embeddable":true,"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/comments?post=8434"}],"version-history":[{"count":0,"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/ht-kb\/8434\/revisions"}],"wp:attachment":[{"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/media?parent=8434"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/ht-kb-category?post=8434"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/membermouse.com\/es\/wp-json\/wp\/v2\/ht-kb-tag?post=8434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}