| | |||||||
| Technology & Technical Skills Computer skills, hardware, software, internet topics, gadgets, programming |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
|
Does anyone here know if the following is possible and, if so, how to set it up: Let's say I have a page template called 'Song' that uses a custom field called 'Lyrics'. Can I make it so that when I create a new page and set the template to be 'Song', that the 'Lyrics' custom field will be automatically added to that page? I've been plowing through the codex, but I cannot find anything that says this is or is not possible... Any help appreciated! thx, Jim. |
| | |
| | #2 (permalink) |
| Senior Member Join Date: Mar 2007 Location: What of it?
Posts: 724
|
Have you looked at this page?: Using Custom Fields « WordPress Codex It sounds like what you want is to use a the_meta() template tag, which has to be a part of the loop. |
| | |
| | #3 (permalink) |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
|
Yes, I read that page. But it only explains how I get my 'Lyrics' custom field onto the page that the website visitor sees. But I'm talking about the administrator interface. What I want is for WordPress to somehow "know" that the Song template uses this field, so I don't have manually add the custom field to every song page I create. That would be highly convenient, because I'll be adding quite a few songs... |
| | |
| | #4 (permalink) | |
| Senior Member Join Date: Mar 2007 Location: What of it?
Posts: 724
|
This is probably something you'd want to ask over in the WP.org support forums, as they'd be much more knowledgeable on the subject. One more thing I may suggest ATM is looking at this basic tutorial: Using WordPress Custom Fields: Introduction: Using WordPress Custom Fields tutorial series This quote from the article *might* be able to apply to what you want: Quote:
| |
| | |
| | #5 (permalink) | |
| Family Member Join Date: Jan 2007 Location: The Netherlands
Posts: 1,823
| Quote:
But your suggestions do highlight the reason why I have a hard time finding my answer: everyone (Google included) assumes I'm looking for help on how to use the fields in the website... I'll try my luck on the WordPress forums... | |
| | |
| | #6 (permalink) |
| Member Join Date: Nov 2006 Location: Milwaukee, WI, USA
Posts: 63
|
I think the problem you're running into is that in order to have a custom field for a post, the field must have a value. There is no sense displaying a field if there is no value for it. Depending on what you're doing, you may want to see if tags might do what you need. Where previously I was using a custom field and entering a value of 'true' to help me organize some posts that I didn't necessarily want in a full-blown category, now I just add a tag, and can view those posts on a /tag/ page, and create custom templates for that page.
|
| | |
| Bookmarks |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to link to an archive in Wordpress? | VacMan | Technology & Technical Skills | 11 | 01-24-2008 02:14 AM |
| Wordpress and Adsense | Nahush | Business & Financial | 6 | 12-17-2007 07:19 AM |
| Very New to Wordpress | jamestl2 | Technology & Technical Skills | 7 | 05-28-2007 04:43 AM |
| Stop WordPress Spam | Adam | Technology & Technical Skills | 5 | 12-12-2006 04:42 PM |
All times are GMT. The time now is 01:24 AM.




