filter for custom field values
-
Hello WPers,
I am trying to run a Regular Expression on the custom field values that I’m echoing in my theme. I’m trying to figure out if they count as part of the_content(). My hunch is “no”. In that case, what filter should I be using to parse the custom field values?
I’m basically trying to cycle through some auto-generated <p> tags and convert them to
- ‘s:
<br /> function reviewFormatting($content) {</p> <p> $match = preg_match_all('/<p>/', $content, $matches);</p> <p> if($match) {<br /> $theContent = preg_replace('/<p>/', ' <li>', $content);<br /> }<br /> return $theContent;<br /> }<br /> add_filter('the_content', 'reviewFormatting'); </li>I know this is incomplete. I’m just testing it to get it do SOMETHING.
Thanks for your help!
- ‘s:
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘filter for custom field values’ is closed to new replies.