• Resolved michaelgjohnson222

    (@michaelgjohnson222)


    I go to add a featured image, the placeholder image for the post goes and away and its blank/white. I viewed source and everything looks correct and i can get to the image directly. Just stumped as to where to begin fiddling.
    Included code. The top 3 do not yet have a featured image added, highlighted code for last entry and where image should be but like i mentioned it renders as white/blank

    photo of what im seeing https://imgur.com/a/UVpyx

    <!–cards–>

    <div class=”container”>
    <div class=”row”>
    <div class=”tab-content col-12″>
    <div class=”tab-pane active” id=”recent” role=”tabpanel”>
    <div class=” d-flex flex-wrap justify-content-center align-items-center”>

    <a href=”http://localhost:8888/mysite/Recipes/pesto/&#8221;
    class=”nounderline col-12 col-md-6 col-lg-4 p-3″ “>
    <div class=” mx-auto card-dimensions card button-elev-shadow”>

    <div class=”card-block text-center d-flex justify-content-center align-items-center”>
    <div class=” my-auto card-title body1 text-blue”>Pesto</div>

    </div>
    <li class=”card-footer list-group-item”>50 ingredients
    </div>

    <a href=”http://localhost:8888/mysite/Recipes/brownies/&#8221;
    class=”nounderline col-12 col-md-6 col-lg-4 p-3″ “>
    <div class=” mx-auto card-dimensions card button-elev-shadow”>

    <div class=”card-block text-center d-flex justify-content-center align-items-center”>
    <div class=” my-auto card-title body1 text-blue”>Brownies</div>

    </div>
    <li class=”card-footer list-group-item”>50 ingredients
    </div>

    <a href=”http://localhost:8888/mysite/Recipes/chimichurri/&#8221;
    class=”nounderline col-12 col-md-6 col-lg-4 p-3″ “>
    <div class=” mx-auto card-dimensions card button-elev-shadow”>

    <div class=”card-block text-center d-flex justify-content-center align-items-center”>
    <div class=” my-auto card-title body1 text-blue”>Chimichurri</div>

    </div>
    <li class=”card-footer list-group-item”>50 ingredients
    </div>

    <a href=”http://localhost:8888/mysite/Recipes/cookies/&#8221;
    class=”nounderline col-12 col-md-6 col-lg-4 p-3″ “>
    <div class=” mx-auto card-dimensions card button-elev-shadow”>
    <div class=”photo-size d-flex align-items-center>
    <img class=”card-img-top img-fluid” src=”http://localhost:8888/mysite/wp-content/uploads/2017/10/chocolate_chip_cookie.jpeg&#8221;
    alt=”Cookies post_thumbnail”>
    </div>

    <div class=”card-block text-center d-flex justify-content-center align-items-center”>
    <div class=” my-auto card-title body1 text-blue”>Cookies</div>

    </div>
    <li class=”card-footer list-group-item”>50 ingredients
    </div>

    </div>
    </div>
    </div>
    </div>
    </div>

    <!–end cards–>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    The code from the php template file would be a lot more useful than the view-source of the page in question, for what it’s worth. That template file will more likely show why the default placeholder graphics are getting used.

    Thread Starter michaelgjohnson222

    (@michaelgjohnson222)

    ok just learning all this stuff… the default images are fine and supposed to be there. I uploaded and added a featured image to the last post entry and its just showing up blank/white. Im trying to figure out why i cant see the featured image. The placeholders are just there for reference.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    As a whole, it’s much more a theme issue than CPTUI or WordPress as a whole. As long as you’re able to create posts in the post type, and assign featured images, the rest is up to the template itself to display anything.

    Would still be interested in the php template to look over and help where possible.

    Thread Starter michaelgjohnson222

    (@michaelgjohnson222)

    Hey there Michael i appreciate the responses. You are correct it is a theme issue. I switched from our theme to WP 2017 and the featured images showed up fine. The theme i am using is custom and isnt just one file. If you still have any ideas im open but i dont think this falls on you to answer =) Thanks again for understanding my newbness.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    For what it’s worth, the process I’d be taking is say the file in question is single-recipe.php. I’d look at that, and check for any spots for the_post_thumbnail() or similar featured image functions. If none are present, I’d start at least lining up the markup from above with what’s in the file and start tracing my way through the rest. Very likely there are calls to get_template_part() in there, that would help determine next files to view. For example, get_template_part( 'content', 'page' ); would tell me to look for a “content-page.php” file. If none is there, then I’d go to the fallback of “content.php” file. In either, I’d once again start looking for the_post_thumbnail() and any logic around it that may make it conditionally displayed. All for the sake of drilling down into the issue.

    Thread Starter michaelgjohnson222

    (@michaelgjohnson222)

    So after some fiddling around i realized that when the posts point towards archive.php the featured images work. But when pointed to archive-recipes.php they do not. Will continue poking.

    Thread Starter michaelgjohnson222

    (@michaelgjohnson222)

    it was some stupid div that didnt need to be there. Holy smokes. Thanks for your help.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Welcome 😀

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Featured image is blank/white’ is closed to new replies.