Forums

Custom Field-Where to insert (7 posts)

  1. gotoguy
    Member
    Posted 2 years ago #

    I have been learning about custom fields. I have spent a great deal of time on this feature and quite frankly it has been a frustration experience. After many hours of viewing many tutorials, I have gotten to the point where I can display a custom field. One thing I have not found information on is the placement of the field. I do not know the techinique of placing. In other words I want to place my field right below my main text in my content area. Does anyone know how I can do that? I hope someone can help me out, because this has just driven me nuts. I'm sure it's easy, but I'm just not getting it.

    Thanks so much.
    Marty

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Assuming by 'main text in my content area' you mean below the content of each post, then you would place something like the_meta after the template tag, the_content().

    Related
    Custom_Fields
    Stepping Into Template Tags
    Stepping Into Templates
    Template Hierarchy

  3. gotoguy
    Member
    Posted 2 years ago #

    My main question is how to insert the fields where I want them. I'm not getting this feature. When I make the custom field, where does it go? How can I place it where I want it?

  4. MichaelH
    Volunteer
    Posted 2 years ago #

    Not too sure of your question. When you write a post or page you enter the custom fields. To display the custom fields you edit the template that is displaying your posts/pages and put the correct 'code' such as the_meta in the template.

    Using the WordPress Default theme as an example, in the file wp-content/themes/default/themes you could place the_meta after this code:

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
  5. gotoguy
    Member
    Posted 2 years ago #

    thanks, Michael. I appreciate your help. After I enter the code, where will the field show up on the page? Top, bottom, etc.?

  6. MichaelH
    Volunteer
    Posted 2 years ago #

    After EACH post's content and comments link. Just try it with the Default theme and then go from there.

  7. petropix
    Member
    Posted 2 years ago #

    I'm having the same problem inserting a new field in the content area of a page I'm trying to edit. I've no problem creating the custom field, ie. I name it, enter the value, and hit 'Add Customs Field.' Ok. Now what? There's no WYSIWYG feature showing me the new field in the Upload/Insert window.

    Help.

Topic Closed

This topic has been closed to new replies.

About this Topic