• Hello, I am editing the plugin file and this is my php code

    <div class="review-thumb relative">';
        $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'post-thumb' );
        $return_string .='<img itemprop="image" src="' . esc_url( $thumb['0'] ) .'" />
    
        <div class="review-thumb-credit">
        <?php echo get_post_meta($post->ID, "mvp_photo_credit", true); ?>
        </div><!--review-thumb-credit-->
    </div><!--review-thumb-->

    The first code executed successfully and I get the post thumbnail. But the second code ( review-thumb-credit ) causing issue and the output is
    ID, "mvp_photo_credit", true); ?>
    This is not the correct output. Anybody help me in this issue.

Viewing 1 replies (of 1 total)
  • Check the code carefully. In the first code the first line is ended with a single quote that means the div tag is assigned to a php string.

    The second code is not like that, the html and php code are independent. Please check if the second code is also to be assigned to any php string.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with php syntax error’ is closed to new replies.