• I’m using some custom fields for a site, and can’t figure out how to include links in them. If I add <a href="example.com">link</a>, it saves as <a href=\"example.com\">

    The relevant code for how I’m outputting the custom fields is similar to this:
    <p><?php echo wpautop( get_post_meta($post->ID, "Bio", true) ); ?></p>

    Any suggestions? I’d like this to be as painless as possible, as the person using this barely knows basic HTML.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Michael Bishop

    (@miklb)

    thanks for the consideration <?php echo stripslashes (wpautop( get_post_meta($post->ID, "Bio", true) )); ?> fixed the issue.

    thanks h0bbel

    What should my PHP code look like if I have a custom field called “bizaddress”?

    Tried
    <?php echo get_post_meta($post_id, 'bizaddress', true); ?>

    Didn’t work.

    Please help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Fields’ is closed to new replies.