WordPress.org

Ready to get started?Download WordPress

Forums

Rewrite Custom Fields url (1 post)

  1. yangchun
    Member
    Posted 1 year ago #

    I use custom fields named 'url' to add another website url (like http://www.youtube.com), I want to rewrite the 'url' as http://www.mysite.com/go/123.

    I tried all rewrite plugins, no one could do this.

    I want set post id as 123

    I want to auto rewrite link when I add it in custom fields named "url".

    For example:

    I named a "url" in custom fields add http://www.yahoo.com as value, I use <?php echo get_post_meta($post->ID, 'url', true); ?> to get it, I don't want to show the link http://www.yahoo.com, I want to rewrite it as http://www.mysite.com/29382 with post id automatically generated.

Topic Closed

This topic has been closed to new replies.

About this Topic