• Resolved circey

    (@circey)


    Hi, I’ve created a custom field “featured-page-title” in a couple of pages, but am having trouble outputting their values.

    I’m trying the following code:

    `<?php
    $page = get_page_by_title(‘Featured Page (1)’);
    $content = apply_filters(‘the_content’, $page->post_content);
    $subby = get_post_meta($page, ‘featured-page-title’, true);
    echo $content;
    echo $subby;
    ?>`

    The content outputs without any problems, but the custom field is not displaying at all. Can someone please tell me where I’m going wrong with this?

    MTIA

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘custom field in a page’ is closed to new replies.