The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Display content from another page with custom fields in WordPress

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #38202

    So, I am trying to hack my way through this and I almost have a solution, but I feel that I am either missing some steps or going about it the wrong way. Either way here’s what I am trying to do.

    In WordPress, I am trying to get content from certain pages that are using custom fields to insert editable blocks of content (MultiEdit Plugin). I have one page setup to call back these pages using the query_post function.
    I have it setup to filter out the pages by a custom field which works, but it’s not pulling the other custom fields into the content area.

    Here’s my code:

    $args = array(
    'post_type' => 'page',
    'meta_value' => 'inventory'
    query_posts( $args ); ?>

    So, from my understanding the above pulls the content from the pages that have the custom field of inventory. But is there something else that I need to include so that it pulls the other content that is in the other custom fields within those pages?

    Any help is greatly appreciated. Thanks!


    I think what you are looking for is.
    <?php echo get_post_meta($post->ID, ‘name_of_custom_meta’, true); ?>

    This will output the saved info in the custom meta box.

    Check the WordPess Codex for get_post_meta() for more details.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.