WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pesky Custom Fields (4 posts)

  1. sustainorder
    Member
    Posted 4 years ago #

    Could someone talk to me like to a child about custom fields?
    My theme is pretty old and I need the plugin crutches all the time to accomplish the littlest of tasks, and thus so my custom fields aren't working.
    I know that I need to include a little code in the Loop like this:
    <php get_the_image( array( 'custom_key' => array( 'Feature' ), 'default_size' => 'full' ) ); >
    I guess! according to Get the image plugin:
    http://wordpress.org/extend/plugins/get-the-image/faq/
    or:
    <?php if ( function_exists( 'get_the_image' ) ) get_the_image(); ?>
    (from readme.txt)

    But where do I insert this piece of code in the Loop- which php file and which spot to be precise for it to work, finally.

    Can I get CFI work without using a plugin? I read the FAQ @ wordpress.org but it doesn't clear this issue for me one bit.
    Thanks to any patient WP gurus!

  2. MichaelH
    Member
    Posted 4 years ago #

    With the help of the Template Hierarchy article, determine what Template is displaying your posts (like index.php), then put that code in the loop. In the WordPress Default theme, in the wp-content/themes/default/index.php, you could put your code after the line that uses "the_content()" or "the_title" (somewhere near there).

    Related:
    Stepping Into Template Tags
    Stepping Into Templates
    Using Custom Fields

  3. sustainorder
    Member
    Posted 4 years ago #

    Thanks MichaelH,
    But I still don't know how to accomplish this. I'd rather not use a plugin, and I am not good at understanding coding.

    Here is my website: http://tinyurl.com/nppd23

    Currently I am using images inserted into the accordion scrollpost, so it appears in the post as well- which I would like not to.
    I tried this plugin:
    http://wordpress.org/extend/plugins/custom-field-images/
    but it didn't work, despite there being the option to avoid the image appearing in content.
    I don't know, there may be something wrong with the theme, it isn't even widget ready.
    I'd really like someone to figure this one out for me, and tell me what to do in an accessible way.

  4. sustainorder
    Member
    Posted 4 years ago #

    I've figured it out finally. It was easy once you get where to put the code, which is never told by any tutorials or help pages. Calling it enigmatically the Loop!

    Resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic