Forums

Calling a Custom Field Value in functions.php (2 posts)

  1. CoolCalmChris
    Member
    Posted 1 year ago #

    Hi,

    I'm looking to call the value of a custom field from a specific post in functions.php to then set as a variable for use in another function. I can't seem to figure it out. Any help would be greatly appreciated and I'd be happy to clarify if I'm not being specific enough.

    Thanks!

  2. richarduk
    Member
    Posted 1 year ago #

    $something = get_post_meta('25', 'blah', true);

    This is the usual way for a post. Is it not working in functions.php?

Topic Closed

This topic has been closed to new replies.

About this Topic