Home Forums General Issues Help needed with displaying images on the front-end.


Help needed with displaying images on the front-end.

  • Hi there.
    I am new to ACF, but after following the docs, my images are showing as broken images.
    I have posted a screenshot and supply code below.
    Any help much appreciated.

    As you can see in screenshot: Link

    here is my code.

     * The template for displaying all pages
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site may use a
     * different template.
     * @link
     * @package base
    	<main id="primary" class="site-main">
    		while ( have_posts() ) :
    			<img />" />
    			get_template_part( 'template-parts/content', 'page' );
    			// If comments are open or we have at least one comment, load up the comment template.
    			if ( comments_open() || get_comments_number() ) :
    		endwhile; // End of the loop.
    	</main><!-- #main -->

    please help 🙂
    Thank you.

  • You should be making your changes in the file template-parts/content-page.php inside of the have_posts() loop in that template.

    get_template_part( 'template-parts/content', 'page' );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.