Support

Account

Home Forums Front-end Issues image not displaying in the_content()

Solving

image not displaying in the_content()

  • I want to display the image that i have uploaded using acf in particular post whose category is catalogue the image is showing in post but when i want to
    display all the post content including that image on page named catalogue
    the_content() only displays the content of post but not the image that i have uploaded in the post whose category name is catalogue.
    <?php
    $category_id = get_cat_ID(‘catalogue’);
    $args = array( ‘posts_per_page’ => 8,’category’ => 3 );
    $myposts = get_posts( $args );

    foreach( $myposts as $post ) : setup_postdata($post);
    //print_r($post);
    $id=$post->ID
    ?>

    <?php
    the_content();
    endforeach;
    ?>

  • Sorry @yasir.shinedezign, is not clear what you say…

    Please check this page http://www.advancedcustomfields.com/resources/field-types/image/ for documentation on how to get a value from a file/image field.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘image not displaying in the_content()’ is closed to new replies.