Hi.
So there’s a dynamic data filters that are MAGICAL. f.e
{post_excerpt:10}
What I’m trying to do is to set 10 as variable that can be reached from a wpcodebox or functions.php.
So lets say I will create a snippet:
<?php
$customExcerpt = 5;
update_option( 'custom_excerpt_length', $customExcerpt, '', 'yes');
?>
Is there a way to utilise it to work with filters. Documentation says about text value filters
:text value
– Depending on the context it could mean the following:
- User or term custom field meta key
- The URL parameter key
- Post terms separator
- Date format
- Image size slug (e.g. thumbnail, or full)
- The echo tag function name
I can use
{echo:get_option('custom_excerpt_length')
to render “5” and that’s works alright.
Is there a way to create smth like:
{post_excerpt:echo:get_option('custom_excerpt_length')}
Thanks!