• Resolved transpersonal

    (@transpersonal)


    I usually use html view exclusively but I need the custom fields to work in WYSYWIG mode. Because I use custom fields to post references in the form of urls and since custom fields seem to work just in html mode the urls are not transformed into hyperlinks. I don’t feel like going through each url and adding <a href… to them one by one. How can I make custom fields work in WYSYWYG mode?

    P.S. changing tinymce’s mode from html to “view” doesn’t do it either ??

Viewing 16 replies (of 16 total)
  • Thread Starter transpersonal

    (@transpersonal)

    Thanks a lot esmi and t31os_. This is what I’m doing now. I am using this in my template:

    <?php $website1 = get_post_meta($post->ID,'website1',true);
    if($website1) echo '<a href="'.$website1.'">'.strip_tags($website1).'</a>'
    ?>
    <br />
    <?php $website2 = get_post_meta($post->ID,'website2',true);
    if($website2) echo '<a href="'.$website2.'">'.strip_tags($website2).'</a>'
    ?>
    <br />
    <?php $website3 = get_post_meta($post->ID,'website3',true);
    if($website3) echo '<a href="'.$website3.'">'.strip_tags($website3).'</a>'
    ?>

    and this in the Custom Field Template (with the “In case that you would like to add p and br tags in textareas automatically” option unchecked):

    [website1]
    type = textfield
    size = 35
    hideKey = true
    
    [website2]
    type = textfield
    size = 35
    hideKey = true
    
    [website3]
    type = textfield
    size = 35
    hideKey = true

    This works great. Thanks again guys for the help!

Viewing 16 replies (of 16 total)
  • The topic ‘How can I enable WYSIWYG view for custom fields’ is closed to new replies.