Support » Themes and Templates » Formatting Custom Fields

  • I am having a problem with the format of my custom fields which I have attached to the quote post format. In my theme the custom field displays on two lines instead of on the same line. Below is an example of a movie quote:

    Mama always said “Life is like a box of chocolates”.

    : Forrest Gump
    : Forrest Gump
    : Tom Hanks

    I used the following CSS to get rid of the bullets and padding for each custom field but did not get each custom field to display on the same line.

    /* Style post-meta-lists*/
    ul.wpuf_customs {
    list-style-type: none;
    margin: 0;
    padding-left: 0;

    Any idea how to get this to display inline?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance. All we can currently suggest is that you try using Firefox with the Firebug add-on for this kind of CSS troubleshooting. Or use whatever developer tool is available in your web browser.

    Here is the link to my quote format post:

    Movie Quote

    I have firebug. The odd thing about this is that in the default theme the custom fields display on the same line. So somewhere in my theme the custom fields are being separated into two lines

    I found the wp-includes/post-template.php file where custom fields are coded. I tried changing the ul to div tags and the li to p tags but it had no effect on the posts custom fields.

    Here is the code:

     * Display list of post custom fields.
     * @internal This will probably change at some point...
     * @since 1.2.0
     * @uses apply_filters() Calls 'the_meta_key' on list item HTML content, with key and value as separate parameters.
    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' ) )
    			$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 "\n";

    So I am still looking for where the custom fields are formatted.

    label {
        color: #333333;
        display: block;
        font-size: 90%;

    style.css line 1234

    Hi esmi,
    Thanks for the response. The above CSS exists as you wrote it above already on line 1234 of my theme’s style sheet. Are you just showing me the location of the css? Any help on how to style it to make the custom fields appear on the same line?

    Are you just showing me the location of the css?

    Correct. Try removing display: block;.

    I tried it and the formatting doesn’t change. This is an issue with my theme (suffusion). When I go to the buddypress default theme the formatting is fine.
    I have posted on the suffusion forum but no resolution yet.
    Thanks for trying

    Hi esmi
    It turns out that
    ended up fixing the issue.
    Thanks again for your help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Formatting Custom Fields’ is closed to new replies.