yanknudtskov of YanCo ApS
5/21/2017 - 10:05 AM

Enfold, insert title into content

Enfold, insert title into content

<?php

/**
 * Add Page Title to Template Builder Content
 */
 
add_filter('avf_template_builder_content', 'yanco_insert_header_into_content' );
function yanco_insert_header_into_content( $content ) {

	if( get_post_meta(get_the_ID(), 'header', true) != 'no') {
  		$content = avia_title( array('breadcrumb' => false, 'html' => "<{heading} class='main-title entry-title'>{title}</{heading}>" ) ) . $content;
  	}

	return $content;
}