<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: Read and rewrite a custom field</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Read and rewrite a custom field</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 08:14:43 +0000</pubDate>

<item>
<title>nandayo on "Read and rewrite a custom field"</title>
<link>http://wordpress.org/support/topic/262692#post-1047498</link>
<pubDate>Thu, 16 Apr 2009 15:30:10 +0000</pubDate>
<dc:creator>nandayo</dc:creator>
<guid isPermaLink="false">1047498@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hello, &#60;/p&#62;
&#60;p&#62;weird question:&#60;br /&#62;
Currently I’m fetching something from a custom field to show it up on the post. &#60;/p&#62;
&#60;p&#62;Example: Custom field &#34;URL&#34;:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;p&#38;gt;URL:&#38;lt;a href=&#38;quot;&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;quot;url&#38;quot;, $single = true);?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php echo get_post_meta($post-&#38;gt;ID, &#38;quot;url&#38;quot;, $single = true);?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/p&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;So when I enter &#60;a href=&#34;http://www.domain.com&#34; rel=&#34;nofollow&#34;&#62;http://www.domain.com&#60;/a&#62; as a custom field, it shows up as &#60;a href=&#34;http://www.domain.com&#34; rel=&#34;nofollow&#34;&#62;http://www.domain.com&#60;/a&#62; on the published post. Perfect.&#60;/p&#62;
&#60;p&#62;But what if the URL is long and if I don’t want to use some tiny url creator? &#60;/p&#62;
&#60;p&#62;I would like to enter some long address (&#60;a href=&#34;http://www.domain.com/directory/someaddress.html&#34; rel=&#34;nofollow&#34;&#62;http://www.domain.com/directory/someaddress.html&#60;/a&#62;) in a custom field and it should shop up as &#34;http://www.domain.com&#34; (but the a href should be the real address).&#60;/p&#62;
&#60;p&#62;Is that possible? I sure know that I can truncate the address, but then it’s not usable... &#60;/p&#62;
&#60;p&#62;Anyone?&#60;br /&#62;
Thanks!
&#60;/p&#62;</description>
</item>

</channel>
</rss>
