{"id":5106,"date":"2023-09-10T15:43:51","date_gmt":"2023-09-10T13:43:51","guid":{"rendered":"https:\/\/bureaumaas.com\/3-ways-to-dynamically-display-the-year-in-the-elementor-footer\/"},"modified":"2025-07-26T12:46:37","modified_gmt":"2025-07-26T10:46:37","slug":"3-ways-to-dynamically-display-the-year-in-the-elementor-footer","status":"publish","type":"post","link":"https:\/\/bureaumaas.com\/en\/3-ways-to-dynamically-display-the-year-in-the-elementor-footer\/","title":{"rendered":"3 Ways to Dynamically Display the Year in the Elementor Footer"},"content":{"rendered":"\n<p>The footer is a crucial part of every website. It\u2019s where important information can be displayed, such as copyright notices, contact details, and links to your social media profiles. One key piece of information to include in your footer is the year. However, manually updating the year can be time-consuming\u2014especially if your website has multiple pages. Fortunately, <a href=\"https:\/\/be.elementor.com\/visit\/?bta=9851&amp;brand=elementor\" target=\"_blank\" rel=\"noreferrer noopener\">Elementor<\/a> offers several ways to make the year in your footer dynamic, so it updates automatically every year.     <\/p>\n\n<p>In this article, we\u2019ll explore three different methods to dynamically update the year in Elementor: by using a code snippet, a shortcode, and Elementor\u2019s built-in dynamic settings. <\/p>\n\n<h2 class=\"wp-block-heading\">1. Using a Code Snippet<\/h2>\n\n<p>One way to change and dynamically update the year in the Elementor footer is by using a code snippet. This method involves adding code to your website\u2019s functions.php file. Follow the steps below:  <\/p>\n\n<p><strong>Step 1; <\/strong><\/p>\n\n<p>Open the functions.php file of your website. You can access this file from your WordPress dashboard by navigating to Appearance &gt; Theme File Editor &gt; functions.php, or by using an FTP editor to go to your (child) theme folder and opening the functions.php file there. This file contains essential code for your theme and allows you to add or modify functionality. Make sure to create a backup of this file first, just in case something goes wrong.    <\/p>\n\n<p><strong>Step 2;<\/strong><\/p>\n\n<p>Once you\u2019re in the functions.php file, scroll to the bottom of the file. Paste the following code at the very end: <\/p>\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"function update_footer_year($text) { $text = str_replace('CURRENT_YEAR', date('Y'), $text); return $text; } add_filter('wp_footer', 'update_footer_year');\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Kopieer\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">function<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">update_footer_year<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">text<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">text<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">str_replace<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">CURRENT_YEAR<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\"> date<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">Y<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">),<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">text<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">text<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">add_filter<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">wp_footer<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">update_footer_year<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span><\/code><\/pre><\/div>\n\n<p>By adding this snippet of code, you\u2019re creating a function called <code>update_footer_year<\/code> that replaces the current year in your text. The filter <code>wp_footer<\/code>ensures that this function is applied only in the footer of your website. <\/p>\n\n<p><strong>Step 3;<\/strong><\/p>\n\n<p>To actually display the year, you need to call the function in your theme\u2019s footer. This can vary depending on the theme you\u2019re using. In general, you can follow these steps:  <\/p>\n\n<ol class=\"wp-block-list\">\n<li>Navigate to \u201cAppearance\u201d &gt; \u201cTheme File Editor\u201d in your WordPress dashboard.<\/li>\n\n\n\n<li>Locate and open your <code>footer.php<\/code>theme\u2019s footer.php file.<\/li>\n\n\n\n<li>Add the following code to the <code>footer.php<\/code> file:<\/li>\n<\/ol>\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"&lt;?php echo update_footer_year('Copyright \u00a9 CURRENT_YEAR website.com.'); ?&lt;encoded_tag_closed \/&gt;  \" style=\"color:#d8dee9ff;display:none\" aria-label=\"Kopieer\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">&lt;?<\/span><span style=\"color: #D8DEE9FF\">php <\/span><span style=\"color: #81A1C1\">echo<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">update_footer_year<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">Copyright \u00a9 CURRENT_YEAR website.com.<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">?&gt;<\/span><\/span>\n<span class=\"line\"\/><\/code><\/pre><\/span><\/div>\n\n<p>This code calls the <code>update_footer_year<\/code> function and replaces the text <code>CURRENT_YEAR<\/code> with the current year. You can customize the text to display your own copyright information, but make sure to keep <code>CURRENT_YEAR<\/code> in place \u2014 otherwise, the function won\u2019t work.   <\/p>\n\n<p>Step 4;<\/p>\n\n<p>To view the changes, save everything and then visit your website. Refresh the page and you\u2019ll see that the year in the footer is now automatically updated to the current year.  <\/p>\n\n<p>However, some themes may require a different approach. Certain themes might generate or control the footer year in another way. In such cases, it\u2019s recommended to consult your theme\u2019s documentation or use one of the following options.  <\/p>\n\n<h2 class=\"wp-block-heading\">2. Using a Shortcode<\/h2>\n\n<p>Another way to change and dynamically update the year in the Elementor footer is by using a shortcode.<br\/>This is a very simple solution and also the quickest to implement. For this step, we\u2019ll again modify the functions.php file by adding the following code:  <\/p>\n\n<p>Open your<code>functions.php<\/code> theme\u2019s functions.php file. You can do this via the Theme Editor in your WordPress dashboard or by accessing your theme folder through FTP. Then, add the code below at the bottom of the functions.php file.  <\/p>\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewbox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"function current_year_shortcode() { $year = date('Y'); return $year; } add_shortcode('current_year', 'current_year_shortcode');\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Kopieer\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">function<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">current_year_shortcode<\/span><span style=\"color: #ECEFF4\">()<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #ECEFF4\">{<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">year<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">date<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">Y<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">return<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">$<\/span><span style=\"color: #D8DEE9\">year<\/span><span style=\"color: #81A1C1\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ECEFF4\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #88C0D0\">add_shortcode<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">current_year<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">,<\/span><span style=\"color: #88C0D0\"> <\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #A3BE8C\">current_year_shortcode<\/span><span style=\"color: #ECEFF4\">'<\/span><span style=\"color: #ECEFF4\">)<\/span><span style=\"color: #81A1C1\">;<\/span><\/span><\/code><\/pre><\/div>\n\n<p>When you now create a footer template in Elementor and add <code>[current_year]<\/code> where you want the year to appear, the year will automatically update to the current year. <\/p>\n\n<h2 class=\"wp-block-heading\">3. Using Elementor Dynamic Settings<\/h2>\n\n<p>Finally, you can also use Elementor\u2019s dynamic settings to make the year in your footer dynamic. This is an option that not many people know about, but it\u2019s incredibly handy and easy to use. Follow the steps below:  <\/p>\n\n<p>For convenience, I\u2019m going to assume you\u2019re familiar with Elementor and know how to create a footer template. Once your footer template is ready, follow the short instructions below and the year will automatically update from now on. <\/p>\n\n<figure class=\"wp-block-video\"><video height=\"1952\" style=\"aspect-ratio: 3298 \/ 1952;\" width=\"3298\" autoplay=\"\" controls=\"\" loop=\"\" muted=\"\" src=\"https:\/\/bureaumaas.com\/wp-content\/uploads\/2023\/05\/dynamic-footer-1.mp4\" playsinline=\"\"><\/video><\/figure>\n\n<p>This third option is, in my opinion, the best choice if you\u2019ve built your website using Elementor. It\u2019s a lesser-known method, so I hope it\u2019s helpful and that you\u2019ll start using it from now on. <\/p>\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n<p>Updating the year in your website\u2019s footer can be a time-consuming task, especially if you <a href=\"https:\/\/bureaumaas.com\/en\/maintenance-support\/\" data-type=\"page\" data-id=\"847\">manage<\/a> multiple client websites. Fortunately, Elementor offers several ways to make the year dynamic, so it updates automatically each year.  <\/p>\n\n<p>Today, we covered three different ways to update the year in your website\u2019s footer and keep it automatically up to date.<\/p>\n\n<p>The first option is manually adding a code snippet to your theme\u2019s functions.php <code>functions.php<\/code> file. While this is a slightly more technical approach, it gives you full control over how the year is displayed.  <\/p>\n\n<p>The second option is using a shortcode. I showed you how to add a handy piece of code to your functions.php file to create <code>[current_year]<\/code> a shortcode called , which you can then insert into a text widget to automatically display the current year. <\/p>\n\n<p>The third option uses Elementor Dynamic Settings. With this feature, you can display the year using a text element and apply dynamic settings to automatically update the year, including adding text before or after it. <\/p>\n\n<p>Each option has its own advantages, and it\u2019s up to you to decide which one best suits your needs and skills. Whatever you choose, the most important thing is that your website always displays an up-to-date year in the footer.  <\/p>\n\n<p>Let me know if you have any questions or show me your solution. Or maybe you\u2019ve found another way? Share it with us!  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to avoid the hassle of manually updating the year in your Elementor footer? Discover four smart ways to automatically update your footer and keep your website always up to date! <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-5106","post","type-post","status-publish","format-standard","hentry","category-onderhoud"],"_links":{"self":[{"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/posts\/5106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/comments?post=5106"}],"version-history":[{"count":1,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/posts\/5106\/revisions"}],"predecessor-version":[{"id":5107,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/posts\/5106\/revisions\/5107"}],"wp:attachment":[{"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/media?parent=5106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/categories?post=5106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bureaumaas.com\/en\/wp-json\/wp\/v2\/tags?post=5106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}