• After migrating the site to another server both $post_id and get_the_ID() return empty strings, where the featured images are supposed to show:

    ‘<div class=”entry-thumb”>
    <img src=”<?php echo wave_get_post_thumb_url(get_the_ID(), 814, 400); ?>” alt=””/> (renders <img src=”” alt=””>)
    <img src=”<?php echo wave_get_post_thumb_url($post_id, 814, 400); ?>” alt=””/> (renders <img src=”” alt=””>)
    </div>’

    The original site works fine in that matter (it is still running previous version of WP, not 4.3)

    Any idea where I should look for the solution?
    wave_get_post_thumb_url is a custom function which came from the theme developers, who are out of business now, but it seems to work fine with the public site.
    It looks rather simple (I am not a PHP developer, so humor me):

    function wave_get_post_thumb_url($post_id, $width = 150, $height = 150) {
    	$attachment_id = get_post_thumbnail_id($post_id);
    	return wave_get_thumb_url($attachment_id, $width, $height);
    }

    Any help would be highly apprecciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The original site…still running previous version of WP, not 4.3)

    If WordPress did not prompt you for a database update following the migration, or even if it did, your problem still might be coming from the fact that sufficient updating had not been done prior to the migration.

    Disclaimer: Just a guess.

    Thread Starter ilya.gerasimenko

    (@ilyagerasimenko)

    @leejosepho:

    Thanks for replying! I think it did ask for a DB update, and I ran the update, and even if something got corrupted in the process, everything else seems to work fine, except for them, featured images.
    Even when I create a new post, the featured image is not rendered. It shows in the sidebar of the post editor, but does not make it to the pages…

    You might try a new thread using ‘post_id and get_the_ID return empty strings’ as a title to be more specific there (and possibly include a link back to this thread). Some folks do not even look at threads that already have a reply, and the more-specific title might catch someone’s eye!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After migrating the site to another server…’ is closed to new replies.