Title: How modify function the_meta
Last modified: August 20, 2016

---

# How modify function the_meta

 *  Resolved [Gloria](https://wordpress.org/support/users/erfo/)
 * (@erfo)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/how-modify-function-the_meta/)
 * Hi…
    I want to edit function the_meta()
 * _post-template.php_
 *     ```
       function the_meta() {
       	if ( $keys = get_post_custom_keys() ) {
       		echo "<ul class='post-meta'>\n";
       		foreach ( (array) $keys as $key ) {
       			$keyt = trim($key);
       			if ( is_protected_meta( $keyt, 'post' ) )
       				continue;
       			$values = array_map('trim', get_post_custom_values($key));
       			$value = implode($values,', ');
       			echo apply_filters('the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value);
       		}
       		echo "</ul>\n";
       	}
       }
       ```
   
 * I want delete “
    `<li><span class='post-meta-key'>..."`, but I don’t want to 
   edit the file post-template.php
 * How?
    Thanks…
 * _[[please do not bump]](http://codex.wordpress.org/Forum_Welcome#No_Bumping)_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [fonglh](https://wordpress.org/support/users/fonglh/)
 * (@fonglh)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/how-modify-function-the_meta/#post-2660768)
 * Add a filter for ‘the_meta_key’ to your theme’s functions.php file, or write 
   a plugin that does the same thing.
 * See the Codex page below for more information on using filters.
    [http://codex.wordpress.org/Function_Reference/add_filter](http://codex.wordpress.org/Function_Reference/add_filter)
 *  Thread Starter [Gloria](https://wordpress.org/support/users/erfo/)
 * (@erfo)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/how-modify-function-the_meta/#post-2660814)
 * Thanks, I wrote another function in functions.php …

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How modify function the_meta’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [the_meta()](https://wordpress.org/support/topic-tag/the_meta/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Gloria](https://wordpress.org/support/users/erfo/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/how-modify-function-the_meta/#post-2660814)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
