Site icon Hip-Hop Website Design and Development

Embrace customized fields into the content material of an everyday web page

Here is my setup:

Baby pages will both have meta containers or customized fields for getting into stuff into my pre-formatted areas. I do not care if it is meta containers or customized fields, no matter is figure-outable!

I am utilizing normal WP-provided code to indicate Baby web page titles and the_content on the Mum or dad web page.

    <?php
    $mypages = get_pages( array( 'child_of' => $post->ID, 'sort_column' => 'post_date', 'sort_order' => 'desc' ) );

    foreach( $mypages as $web page ) {
    $content material = $page->post_content;
    if ( ! $content material ) // Examine for empty web page
    proceed;

    $content material = apply_filters( 'the_content', $content material );
?>

    <div class="gallery-wrapper">
        <div class="physique">
            <div id="zoom">
                <span></span>
                <?php echo $content material; ?>
            </div>
            <a href="" rel="lightbox">Click on to enlarge and think about mission gallery</a>
        </div>

        <div class="sidebar" type="margin-bottom: 30x; padding-top: 20px;">
            <h3><?php echo $page->post_title; ?></h3>
            <p><robust>Objective:</robust> <?php echo get_post_meta($post->ID, 'ecpt_goal', false); ?></p>
            <p><robust>Problem:</robust> <?php echo $ecpt_challenge; ?></p>
            <p><robust>Answer:</robust> <?php echo $ecpt_solution; ?></p>
            <p><robust>Outcomes:</robust> <?php echo $ecpt_results; ?></p>
        </div>
    </div>
        <div class="clear-border"> </div>

        <!--- --->
<?php
}   
?>

Not one of the customized areas are exhibiting up on the Mum or dad web page. I do not know learn how to filter them, and ideally wish to embody the customized fields OR metaboxes into the_content.

<p><robust>Objective:</robust> <?php echo get_post_meta($post->ID, 'ecpt_goal', false); ?></p>
<p><robust>Problem:</robust> <?php echo $ecpt_challenge; ?></p>

Each of those strains work to tug the meta field information into the person Baby web page, undecided what the distinction is, together with only for reference.

Alternatively, if you know the way to incorporate customized fields into the_content, this is what I am utilizing with ACF:

<h3><?php the_field(client_title_1); ?></h3>
<robust>Objective:</robust> <?php the_field(goal_1); ?>
<robust>Problem:</robust> <?php the_field(challenge_1); ?>

ETC.

Thanks very a lot upfront!

EDITED TO ADD:
Is there a means so as to add my customized meta containers or fields to the default set so they might routinely be included into the_content with out filters and hooks?