WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Custom Field Template] WordPress does not process custom text field

[Resolved] [Plugin: Custom Field Template] WordPress does not process custom text field

  • proximity2008
    Member

    @proximity2008

    This could be really simple but:

    I have a custom field as a textfield with tinyMCE.
    If I attach an image to the custom field the image shows up fine but the caption is not processed on the front end. It literally is outputted as [caption id="attachment_646" align="alignnone" width="225" caption="caption information"]: …image…[/caption]

    How do I get around this? Do I need to run content through a function to get it outputting properly first?

    [Image Column]
    type = textarea
    cols = 36
    rows = 10
    tinyMCE = true
    mediaButton = true
    class= imagecol
    output = true

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • kandi_nyc
    Member

    @kandi_nyc

    have you been able to find a solution for this? i’m having the same issue.

    thanks!

    kandi_nyc
    Member

    @kandi_nyc

    can anyone provide assistance?

    proximity2008
    Member

    @proximity2008

    Hi Kandi,

    Yes I got is sorted:

    <?php
    $unprocessedfield = get_post_meta($post->ID, 'nameofyourcustomfield',true));
    $processedfield = apply_filters('the_content', $unprocessedfield );
    echo $processedfield;
    ?>

    I don’t get how that fixed it.

    When I use the method above, I still get the close tag for caption showing

    [/caption]then article text begins

    morethanever
    Member

    @morethanever

    Manntis,

    proximity2008’s solution didn’t work for me either,
    while this, which seems identical, did:

    echo apply_filters(‘the_content’, get_post_meta($post->ID, ‘nameofyourcustomfield’, true));

    i don’t know if it’s a PHP4 thing or maybe the way strings are stored/displayed. Hope that helps.

    zandercent
    Participant

    @zandercent

    just thought I’d point out that there’s an extra ‘)’ in here – it should be

    <?php
    $unprocessedfield = get_post_meta($post->ID, 'nameofyourcustomfield',true);
    $processedfield = apply_filters('the_content', $unprocessedfield );
    echo $processedfield;
    ?>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: Custom Field Template] WordPress does not process custom text field’ is closed to new replies.