I don't understand how do you use the preg_replace command in php
I created a text area in theme settings panel to display a default description for every post and would be nice if I can mix the description using {tags} or {title} to grab the post title or post tags.
I have tried using the following code but got some errors.
description code
$description = get_post_meta($post->ID, 'field_description', true); if(!empty($description)) {
$seo_desc = get_option('mytheme_seo_description');
echo $description;
} else if(!empty($seo_desc)) {
echo $seo_desc;
setting panel
$options[] = array( "name" => __('SEO DESCRIPTION','mytheme'),
"desc" => __('Mix {title} {tags} {categories} in a default description to grab post title, tags and categories','mytheme'),
"id" => $shortname."_seo_description",
"std" => "",
"type" => "textarea");
Is it possible to use {title} {tags} {categories} for grabbing the post title,tags and categories using any function?