Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1032075

    I’m sure this isn’t an Enfold issue, but perhaps someone here as experienced this. I did search this forum, but could not find anything that helps directly.

    I’m going round an round with no luck. I’ve got a custom post type and some custom fields created with ACF. I would like to be able to show one or two fields from the latest post on my homepage. Sounds easy. I can’t make this work!

    ACF shortcodes do not work on a page unless the post_id is available.

    [acf field=”field_name” post_id=”123″]
    The above works, but I want the newest post whatever post_id that may be.

    [acf field=”field_name”]
    The above does not work on a page. Why? is the page outside the loop??

    I’ve tried building a function to get the latest value from that field and use that to create a shortcode. This too is not working for me.?? I have various examples from found code that is not working.

    I’ve tried Custom Content Shortcode with no luck.

    Is this that difficult? Has anyone done this and have some suggestions?

    Again, I understand this my problem and not something with the theme. I’m desperate!

    #1032085

    More on this, I found a chunk of code on Stack Exchnge which I added to my loop-page.php in my child theme, but can’t get this to help.

    echo apply_filters(‘the_content’, get_post_meta($post->ID,’mycostomfield’, true));

    [mycostomfield] does nothing??

    #1032589

    Please disregard this. Lot’s of researching and I’m going a different route.

    #1033134

    Hi Killick,

    Please refrain from bumping or replying to your own thread because it gets pushed back to the end of the queue and moderators won’t be able to provide a response immediately. Please be patient while we go through the rest of the queue. Thank you for your understanding.

    If you need further assistance please let us know.

    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.