WordPress.org

Ready to get started?Download WordPress

Forums

Allow PHP in Posts and Pages
Code does not working (1 post)

  1. tRUStY
    Member
    Posted 11 months ago #

    Hello guys!

    I have the following code but it is not working, can somebody help:

    [php]
    $args = array(
    'number' => '3',
    'post_id' => 50, // use post_id, not post_ID
    );
    $comments = get_comments($args);
    foreach($comments as $comment) :
    echo('<table width="33%" border="0" align="left" cellpadding="0" cellspacing="0" >
    <tr>
    <td align="center"><img class="elveszett-kep" src="/wp-content/comment-image/'.$comment->comment_ID.'.jpg" width="200" height="150"></td>
    </tr>
    <tr>
    <td align="center"><div class="text-limit">'.$comment->comment_content).'</div></td>
    </tr>
    </table>';
    endforeach;
    [/php]

    http://wordpress.org/plugins/allow-php-in-posts-and-pages/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.