Home Plugin documentation Hooks and functions Functions get_pip_header()

 

 

Here we go!

 

get_pip_header()

Heads up!

This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don’t provide support for code customizations or 3rd party development.

Get header from Site Template

/**
 * Get flexible header content
 *
 * @param bool $echo
 *
 * @return false|string|void
 */
function get_pip_header( $echo = true ) {

    $pip_flexible_header = acf_get_instance( 'PIP_Flexible_Header' );
    $pip_pattern         = acf_get_instance( 'PIP_Pattern' );

    if ( $echo ) {
        echo get_flexible( $pip_flexible_header->get_flexible_header_field_name(), $pip_pattern->pattern_post_id );
    } else {
        return get_flexible( $pip_flexible_header->get_flexible_header_field_name(), $pip_pattern->pattern_post_id );
    }
}

You didn’t find the answer you were looking for?

or you think a specific topic deserve more informations?

 

Wave to bottom