Jump to content

Wordpress: how to add the featured image to a page !? 


dil_bert

Recommended Posts


hello again,  untill now i did not fix the issues,

here a description that fits most: https://wordpress.org/support/topic/post-page-not-showing-featured-image/

question: I have installed the theme but on post page, none of the post showing the featured images, just showing on the home page…
Can anyone help to resolve this problem so post page can also show the related featured image?

answer: I managed to bodge it by adding this to (my child theme’s) single.php

`
 

<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
the_post_thumbnail( 'full' );
}
?>
(Insert after <?php while ( have_posts() ) : the_post(); ?>)
<img src="wherever" />


and  a link: https://www.wpbeginner.com/beginners-guide/how-to-add-featured-image-or-post-thumbnails-in-wordpress/

note: i did not have applied the code to a child-theme yet. 

but i deactivated all the plugins - step by step. - without any success. 
note: i have upgreaded the server from PHP-Version 5.6 to Version 7.2xy

at the moment i struggle with some issues on the page: 

`Warning: ini_set(): open_basedir restriction in effect. File(/tmp/wp-errors.log) is not within the allowed path(s): (/sites) in /sites/www.my-site.com/wp-includes/load.php on line 345`

condluding question: is it possible that this can cause the issues?!? with the featured image!? 

look forward to hear from you 

regards 

Link to comment
Share on other sites

  • 3 months later...
  • 10 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.