使用if语句从其他页面复制高级自定义字段内容

Im trying to copy some content from another page with an if statement that has an input from advanced custom fields so I dont have to manage two pages with the same content. However the code has a bug in it which prevents the page from loading when this section starts. I guess I made a type somewhere. What could it be?

The first block contains the information from post id 4767 that i want to display on post id 4940. The second block is the information that would normally be loaded and is entered on all the individual pages.

<?php if(is_single('4940')) { 
            if( have_rows('partner', 4767) ):
                while ( have_rows('partner', 4767) ) : the_row();
                    $partnerTag      = get_sub_field('partner_tag', 4767);
                    $partnerName     = get_sub_field('partner_name', 4767);
                    $partnerImage    = get_sub_field('partner_image', 4767);
                    $partnerImageUrl = $partnerImage['sizes']['medium'];
                    $partnerLink     = get_sub_field('link', 4767); 
      } else { 
            if( have_rows('partner') ):
                while ( have_rows('partner') ) : the_row();
                    $partnerTag      = get_sub_field('partner_tag');
                    $partnerName     = get_sub_field('partner_name');
                    $partnerImage    = get_sub_field('partner_image');
                    $partnerImageUrl = $partnerImage['sizes']['medium'];
                    $partnerLink     = get_sub_field('link');
 } ?>

ps. I tried both: is_single('4940') and is_single(4940)

You could just check the value of $post->ID directly.

if( $post->ID == 4940 ) { ... }

Are you within the query? is_single() and is_singular() will not work outside loop.