WordPress.org

Support

Support » Plugins and Hacks » Custom Field Template » [Plugin: Custom Field Template] custom field values on the frontend

[Plugin: Custom Field Template] custom field values on the frontend

  • I’m at my limit and begging for some guidance! (Don’t want to hire someone… I want to learn it, but I’m missing something!) I have tried every plugin free & many paid. I can’t seem to get custom data to show up on the frontend. I know what php looks like and that’s about it! Could someone please show me an example to get the values on my site?? I have used just about ever tutorial I could find and they all lack in getting all the custom stuff to actually show up!

    By the way I’m using Genesis framework with a child theme in case that matters any.

    Thanks!

    http://wordpress.org/extend/plugins/custom-field-template/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,
    I was looking for the same thing. I found a solution and maybe it will work for you. In my theme, I edited the page ‘single.php’. This is the template for my Post page.

    I was looking to add this: <?php the_meta(); ?> in the loop.

    You need to find the correct place to insert it and then save the page. I use an FTP program and Dreamweaver. I have a copy on my local computer of the files that are on my server and use FTP to copy back and forth.

    BTW, before I change any file, I copy the original and give it a name – singleORIG.php. That way, I can go back if I break something.

    The single.php file will be slightly different depending on the theme. Here is where I inserted the meta code in one theme:

    This is an excerpt inside what is called the loop.
    <!– post content –>
    <div class=”entry-content clearfix”>
    <?php the_content(); ?>
    <?php the_meta(); ?>
    </div>

    Another theme I use has a slightly different single.php, and I inserted the meta code as follows:

    <div class=”loop”>
    <div class=”loop-content”>
    <?php while ( have_posts() ) : // The Loop ?>
    <?php the_post(); ?>

    <?php get_template_part( ‘content’, ‘single’ ); ?>
    <?php the_meta(); ?>
    <?php comments_template(); // include comments template ?>
    <?php endwhile; // end of one post ?>
    </div>

    I hope that helps you.

    Nancy

    I found a tutorial that explains it better than I can. http://perishablepress.com/wordpress-custom-fields-tutorial/

    output = true

    after the field form and it should appear. My only problem – I can’t get it to disappear now! 🙁

    e.g.

    [favourite book]
    type = text
    label = What’s your favourite book?
    output = true

    another option is

    echo get_post_meta($post->ID, $custom_field_key, true);

    (remembered why it wasn’t disappearing. My bad – left some old testing code in my layout.)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Custom Field Template] custom field values on the frontend’ is closed to new replies.
Skip to toolbar