You can search-replace those placeholders with the_content
filter.
function custom_the_content( $content ) {
return str_replace('{placeholder}', get_the_title(), $content);
}
add_filter('the_content', 'custom_the_content');
Note: I don’t recommend using ***
or similar as a placeholder, as it can be commonly used. That is why I’ve used {placeholder}
.
UPDATE: Based on the comments below, if you need to search-replace multiple values within the_content
filter, use arrays as str_replace
arguments like below:
function custom_the_content( $content ) {
// Search for these elements
$search = array(
'{apktitle}',
'{apkversion}',
);
// And replace them with these (the order of array items is preserved)
$replace = array(
get_the_title(),
get_datos_info('version'),
);
return str_replace( $search, $replace, $content );
}
add_filter('the_content', 'custom_the_content');