WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Display Custom Field (3 posts)

  1. dannynguyen
    Member
    Posted 2 years ago #

    Hi,

    I've copied the Further Customization for Adding Custom Fields from the code on Github, and pasted into my function.php file, but I am getting this error.

    Parse error: syntax error, unexpected ';'

    On the line that would state
    $location = esc_attr( get_post_meta( $post->ID, 'location', true );

    from Github.

    Any help or solutions would be greatly appreciated.

    http://wordpress.org/extend/plugins/display-posts-shortcode/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    That line should read

    $location = esc_attr( get_post_meta( $post->ID, 'location', true ) );

    It was missing a ). Can you post a link to the original code on github so I can update it?

    Thanks

  3. dannynguyen
    Member
    Posted 2 years ago #

    Bill,
    Thanks for the help! I can't believe it was as easy as a missing ).

    Here is the link on Github
    https://gist.github.com/1209601

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic