• I am trying to modify the_meta() so that numeric custom fields are displayed with commas and dollar signs.

    Where do I modify the core function without changing the core file? Do I use functions.php?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hook the ‘the_meta_key’ filter. Your callback function is passed 2 parameters, the key and corresponding value for each meta item, one pair at a time. Return your desired HTML for each item in the list, including the <li> tags. Whatever you return is immediately echoed out.
    ,
    This filter hook may reside in functions.php, preferably the one belonging to your own child theme.

Viewing 1 replies (of 1 total)

The topic ‘how to modify core function the_meta()’ is closed to new replies.