Support

Account

Home Forums Front-end Issues CPT Loop not returning get_field but does get_post_meta Reply To: CPT Loop not returning get_field but does get_post_meta

  • Hi @Idealien

    Thanks for posting your last snippet of code. This shows that the issue is not related to your loop at all, there is something else going on.

    Can you please debug the returned value like so:

    
    <?php 
    
    echo '<pre>';
    	var_dump(get_field('highlight_call_to_action', 64) );
    echo '</pre>';
    die;
    
    ?>
    

    What result do you get?

    Can you also check your DB and make sure that for post_id = 64, there is a row in your wp_postmeta table which contains the highlight_call_to_action value?
    What does it look like? Does it also have a ‘reference value’ below it in the table (underscore version)? Screenshot?

    Thanks
    E