Support » Plugin: Custom Field Template » [Plugin: Custom Field Template] Displaying on Post

  • Hello,
    I have problems with the fields showing up on the posts. I’m not really good with php. What I have been doing is putting this into the bottom of functions.php (theme functions.php)

     function getCustomField($theField) {
    	global $post;
    	$block = get_post_meta($post->ID, $theField);
    		foreach(($block) as $blocks) {
    			echo $blocks;

    And this into single.php

    <?php getCustomField('Day Number'); ?>

    This is my settings.

     [Day Number]
    type = text
    size = 10
    output = true

    I’m using Suffusion theme and I have no idea what I’m doing wrong.

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Update:
    Found that I should only need to add

    <?php echo get_post_meta($post->ID, 'Your Field Name', true); ?>

    to the template but I have no idea which file or line.


    Tara Rotten



    Do you know how to add the custom field name as well as the field content

    Day Number: field content


    Yes, this takes a little getting your head round.

    Nick1. Your code goes into the page (ie: page.php or single.php) in the position you want it to show.

    I’m trying to get these custom fields to show in a widget – anyone know how to do that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Custom Field Template] Displaying on Post’ is closed to new replies.