Support

Account

Home Forums Feature Requests Get custom field inside query loop block Reply To: Get custom field inside query loop block

  • what do you think what i am? A machine? I can not read your comment / code. So i can not help you. But placing custom content before/after something is just like changing the order in the code. code for outputting the acf field after the title:

    add_filter( 'render_block_core/post-title', function( $block_content, $block ) {
    	if(!empty($block["attrs"]["className"]) && $block["attrs"]["className"] != "company") return $block_content;
    		
    	return sprintf("%s<div style='margin-top:%s'><strong>%s</strong></div>",$block_content,"10px",get_field("company"));
    }, 10, 2 );