Support

Account

Home Forums Front-end Issues Can't see custom fields on Woocommerce shop page Reply To: Can't see custom fields on Woocommerce shop page

  • sorry for the long delay, you’re reply got burried. Anyway, the post id should already be set up by this

    
    $post_object = get_field('select_sidebar');
    
    if( $post_object ): 
    
    	// override $post
    	$post = $post_object; // this set up the post data including the ID
    	setup_postdata( $post ); 
    
    	?>
        <div class="col-xs-12 col-sm-4 sidebar">
    
    <?php if( have_rows('sidebar_blocks') ): ?>
    

    If this is not working then I’m not sure what the problem is. It could be that the global $post is not defined. Try defining it by adding

    
    global $post;
    

    before $post = $post_object;