gotoguy
Member
Posted 4 weeks 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
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
gotoguy
Member
Posted 4 weeks 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?
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>
gotoguy
Member
Posted 3 weeks ago #
thanks, Michael. I appreciate your help. After I enter the code, where will the field show up on the page? Top, bottom, etc.?
After EACH post's content and comments link. Just try it with the Default theme and then go from there.