• Resolved jimmyt1988

    (@jimmyt1988)


    Hi there,

    Is it possible to return META DATA stored in database as Plain text? I am doing: get_post_meta($post->ID, ‘title_tag’, true);

    but hyphens and quote marks are getting ASCIFIED ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • Perhaps if you post your snippet of code (or use pastebin if more than 10 lines), we can offer some insight. It is a little odd that the text is getting encoded. The quote marks should be escaped but that is easily undone on output.

    Thread Starter jimmyt1988

    (@jimmyt1988)

    <title><?php
        if(get_post_meta($post->ID, 'title_tag', true)){
            echo wp_title();
            bloginfo( 'name' );
        }else{
            echo get_post_meta($post->ID, 'title_tag', true);
        }
    ?></title>

    returns

    <title> ? DawnClassic and Vintage Wedding Cars</title>

    P.S now i have posted it here.. why does the &raquo come up.. thats the problem. haha. goodness me.

    Meh, i’ve removed it now. it was wp_title(); and its pointless.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘return meta data as plain text’ is closed to new replies.