WordPress.org

Ready to get started?Download WordPress

Forums

Filter Custom Fields (Post Meta) (4 posts)

  1. Justin Tadlock
    Member
    Posted 6 years ago #

    Is there a way to filter post meta keys and/or values like you do content and excerpts?

    add_filter('the_content', 'Example_Parse');
    add_filter('the_excerpt', 'Example_Parse');

    I've searched the http://codex.wordpress.org/Plugin_API/Filter_Reference and couldn't find anything. There doesn't seem to be a lot of discussion on this topic.

  2. Dalton
    Member
    Posted 6 years ago #

    If anyone else is looking for an answer to this, filtering the_meta does seem to work. I don't think it's really mentioned anywhere.

  3. MrBrian
    Member
    Posted 5 years ago #

    I'm surprised this hasn't been implemented yet fully. There are no filters for get_post_meta or get_meta, and I could really use it right now.

  4. schmaart
    Member
    Posted 5 years ago #

    Do any one of you have time to tell me the php I would use in place of <?php the_meta(); ?> to exclude two particular Custom fields from the list generated by the_meta?

    thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic