I am using Custom post types in one of my themes I have one custom post type called “accommodation” with meta boxes to add details such as type of rooms (single, twin, double…); each room has a price according to different season (high season, low season, peak season – each could be ). However the […]
I’ve added some code to my templates which automatically adds custom fields to cache some data that each post pulls in. Is there a way that I can track how many posts have had this custom field set?
Say I have a custom post type called “Performers”. This gets populated with different bands/performers. These posts have a featured image as well as custom fields (mp3 file, facebook link, myspace link, etc). I have another custom post type called “Events”. When I create a new Event post, I would like the option to have […]
In the latest version of WP it’s gone. Why?
I am still new to WordPress and I want to insert a featured content gallery into a WordPress page. I tried to do it myself, but it wanted me to use custom fields. Where can I add custom fields, is there any coding required? or do I just enter the value into custom fields text […]
how can i use multiple meta_key and meta_value in query_posts? For example, I want to find multiple content with two different meta_key and meta_value. How do I do this? i using this code but not effective: query_posts(‘meta_key=test2&meta_value=hello&meta_key=test2&meta_value=bye’); please help me…
I want to get all featured items using query post. featured is meta_key using custom field plugin. I tried bellow,but it failed $featured_item = new WP_Query(‘posts_per_page=-1&cat=3&meta_key=>Featured List&meta_value=>Yes’); my wp version is 3.1.3 EDIT: $arg2 = array( ‘posts_per_page’=>’5’, ‘cat’=>’3’, ‘orderby’=>’rand’, ‘meta_query’=> array( ‘key’=>’Featured List’, ‘value’=>’Yes’, ‘compare’=>’LIKE’ ) ); $featured_random_item = new WP_Query($arg2); This query also failed. […]
I’m trying to migrate a site to WP. We have a whole bunch of pictures, and I have done some research and figured — I think — my best bet is a CSV import of the data, storing the relative URL of the image as a custom field. So, I found this –which looks ideal […]
I want to add few custom fields to categories. So I am looking for something like add_meta_box but for categories. Is there any WP function like that for categories?
So I’ve been coding a theme and I’m working on a custom post type. When I edit a custom post and save the changes (click Update) everything is ok. But – I noticed that when I leave the Edit page open for a while and come back to it a few minutes later and try […]