Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

So, if I'm publishing a post, and set a value for this posts custom field, can I set the custom field value of all other posts to false?


Well that's good to hear that it is possible, but maybe there is a better way to achieve my goal: I'm fairly new to WordPress, and the WordPress stack exchange site so I apologize if I'm not putting out all the required info.

I have a "Designer" custom post type for creating profiles of designers, and I would like to have the option for "Featuring" 1 particular designer and un-featuring the previously "Featured" designer. I am using "Custompress" plugin for post types, taxonomies, and custom field, currently.

Thoughts on how I might achieve this are all very welcome!


I like the sounds of mfields suggestion, but I have yet to discover what a "custom setting" is. Would you mind elaborating or pointing me in the right direction?

share|improve this question

migrated from webmasters.stackexchange.com Jun 30 '11 at 2:52

This question came from our site for pro webmasters.

    
Thanks for the resource! I will post if I find anything. –  Ben Jun 29 '11 at 23:00
    
Yes, you can. But I am wondering why do you want to do that? –  Hameedullah Khan Jun 30 '11 at 3:00
    

1 Answer 1

In the event that there will only ever be one featured designer, I would suggest using a setting instead of postmeta. This will be much faster, cleaner and less prone to error. You can store the value posts ID value in this custom setting and just overwrite the value when a new designer is featured.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.