PHP Echo just the text of a custom field
-
In each post, I have a custom field that looks like this:
<a href="http://www.mysite.com/albumtitle">Album Title</a>
Using the following code, I can display the custom field anywher I want:
<?php echo get_post_meta($post->ID, 'album', true); ?>
And it works, it displays the above custom field, HTML included, as it should…
But what do I do, if I just want to display the Album Title part of the custom field – and not the HTML/URL surrounding it?
Something to do with echo get_post_meta AND strip tags, or something possibly?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘PHP Echo just the text of a custom field’ is closed to new replies.