# Bricks Dynamic Tag: {wpide_year}

> Adds a {wpide_year} dynamic data tag to Bricks that outputs the current year, for footer copyright lines that update themselves.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: bricks, dynamic-data, date
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/bricks-dynamic-tag-current-year/

## Code

```php
add_filter( 'bricks/dynamic_tags_list', function ( $tags ) {
    $tags[] = array( 'name' => '{wpide_year}', 'label' => 'Current year', 'group' => 'Site' );

    return $tags;
} );

add_filter( 'bricks/dynamic_data/render_tag', function ( $tag, $post = null, $context = 'text' ) {
    $name = is_string( $tag ) ? trim( $tag, '{}' ) : $tag;

    return 'wpide_year' === $name ? wp_date( 'Y' ) : $tag;
}, 20, 3 );

$wpide_bricks_year_replace = function ( $content ) {
    if ( ! is_string( $content ) || false === strpos( $content, '{wpide_year}' ) ) {
        return $content;
    }

    return str_replace( '{wpide_year}', wp_date( 'Y' ), $content );
};

add_filter( 'bricks/dynamic_data/render_content', $wpide_bricks_year_replace, 20 );
add_filter( 'bricks/frontend/render_data', $wpide_bricks_year_replace, 20 );
```

## Notes

Find it in the dynamic data list under "Site". You can also type {wpide_year} into any text field.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Bricks Dynamic Tag: {wpide_year}" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
