---
title: Adding Custom Login Redirect Placeholders
description: "There is an available filter `rul_replace_variable` for adding your own custom placeholders. Say you want to add a **{{month}}** placeholder that is a numeric representation of the current month (with leading zeros), you can use the code below. ```php function…"
url: "https://loginwp.com/docs/adding-login-redirect-placeholders/"
updated: "2024-10-15"
category: Code Snippet / Developer
---

# Adding Custom Login Redirect Placeholders

There is an available filter `rul_replace_variable` for adding your own custom placeholders.

Say you want to add a **{{month}}** placeholder that is a numeric representation of the current month (with leading zeros), you can use the code below.

```php
function customRULVariableMonth( $value, $variable, $user )
{
    if( 'month' == $variable )
    {
        return date( 'm' );
    }
    else
    {
        return $value;
    }
}

add_filter( 'rul_replace_variable', 'customRULVariableMonth', 10, 3 );
```
