Custom Fields are fields that can holds arbitrary extra information known as meta-data.

learn more… | top users | synonyms (2)

2
votes
1answer
1k views

Check before publishing, if already exist post with current custom field value

I have a custom post type with only 3 custom fields in it. $post_types = get_post_meta($post->ID,'post_types',true); $post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true); ...
0
votes
1answer
696 views

Auto embeding Vimeo/Youtube in custom fields (tinyMCE editor)

I'm using 2 extra TinyMCE editors on my pages to add extra textfiels in my theme pages. I now realize that the auto-embed feature is not supported on content delivered thought custom fields. So i need ...
0
votes
2answers
3k views

WP_Query multiple use of relation and/or

I have 2 custom fields that I would like to do a meta query on for a custom post type: start_date status The outcome that I am looking for is (start_date >= 1332115200 AND status = 1) OR ...
0
votes
1answer
524 views

Front-end Image Upload to Custom Meta Box

I'm currently using a custom post type with a custom meta box for two image uploads. I'm trying to create a front-end post page where the user can upload their own images from their desktop. All of ...
1
vote
1answer
564 views

how do i remove posts from a WP_Query so the pagination is right?

I'm using a custom post type and showing 20 of them per page on the homepage. I'm using QP_Query. One custom field for the custom post type (called mixtapes) is a checkbox called "unreleased" (set ...
2
votes
1answer
49 views

Leader board for game on homepage

I've built a simple game which is housed on my homepage. I'd like to create a leader board (a small results table) which displays the top three 3 scores. How would i insert/retrieve the score data ...
2
votes
1answer
1k views

add meta box using function.php

hi does any one know how can i add other meta box and save the data in a different custom fields, using the code below. <?php function add_meta_boxes() { add_meta_box( ...
0
votes
1answer
523 views

Multiple Custom Field Query

I have a unique situation where I need to filter on 2 custom fields where 1st field is expiry and values of "" and greater than todays date are valid and 2 field is a number which should be greater ...
2
votes
1answer
126 views

Can ordering post list by meta_value cause performance issue?

For some code refinement and to add new features to my plugin, I want to display posts ordered by specific meta column value like this; query_posts($query_string . ...
2
votes
2answers
353 views

Plugin allowing for artists, events and venues

I'm working on a music festival website and up until now have used WordTour. I really like WordTour's artists > events > venues content hierarchy, but am having difficulties transitioning from last ...
0
votes
1answer
163 views

How show post only from after custom date

I have custom post type. In this custom post type I have custom field with date in format: 23/09/2012 How to show only posts, which currently date is before date from these custom field? Sory for my ...
0
votes
1answer
398 views

Custom Meta Box Upload Image Problem

Ran into a problem with an image upload part of a theme feature. The code uploaded at http://pastebin.com/Qnn2D36N (that's the entire script for adding the meta boxes) generates custom meta boxes on ...
7
votes
1answer
10k views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
2
votes
3answers
6k views

Return all custom meta data for one custom post type

I've set up a custom post type which has three custom meta fields: name, latitude, longitude. Each post already shows the name on an integrated map based on it's latitude and longitude. I now would ...
0
votes
1answer
151 views

How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?

I need to know the most efficient method to grab 3 pieces of data from from multiple posts: Post title Thumbnail Custom Field I am attempting to build a Google map of posts using data stored in WP ...
0
votes
2answers
730 views

How to disable Edit Post and Allow only Custom Field?

What I would like to know is if it is possible to disable the edit post function in wordpress based on User's roles. I try to explain better. Let's take an 'Editor' as role example: I would like ...
3
votes
1answer
5k views

How can I add extra attribute in the 'Page Attribute' section in wp-admin for pages?

I would like to add a select list in the Page Attribute box you see on the right side in the administration interface for pages. Does anyone know if that is possible? Or at least add a custom box ...
3
votes
1answer
748 views

How can I change the admin search posts fields?

I have a custom post type that includes many custom fields. I would like to add them as a search target to admin search. Currently the admin search searches only the content and the title, I would ...
0
votes
1answer
78 views

Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?

I´m building a real estate site where Estates is a custom post type. I want to be able to tick a checkbox or something similare on the edit page, where I can choose if the estate is for rent, if it ...
0
votes
1answer
1k views

How do I list a custom field and custom taxonomies for each result in a loop?

How do I list a custom field and custom taxonomies for each result in my loop below? <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); ...
0
votes
1answer
408 views

Compare meta_query decimals not working right

I have a custom field named 'rating' that holds decimals from 1.0 to 10. I am trying use wp_query to get me all the posts with a rating of 8.0 to 10. What I have so far almost works perfectly but it ...
1
vote
2answers
135 views

Show values of dynamically created custom meta keys

I have a form and date fields in it: "date from" and "date to" (to make a specify a period of availability. There may be several available periods, so I made a button by which you can add more "date ...
0
votes
1answer
260 views

I need a “Choose from existing content” popin

I'd like to create a field that allows the admin to select from other existing post types. Specifically, I want to create an options box to choose which events display on the homepage. For now, I've ...
1
vote
1answer
46 views

How to let users choose where to search for posts?

I have no code to let you correct/see, I'm still in 'thinking stage'. What i would like to achieve is this: A real estate website with a few search functionalities. This new agency (REALLY NEW we have ...
0
votes
1answer
577 views

Populate wordpress menu with link to custom field value (file download)

I have an additional menu that appears on some single.php pages. To this menu I would like to add an li with a link to a PDF which is uploaded to the post by a custom field (advanced custom fields ...
1
vote
3answers
2k views

Using new WP_Query in shortcode in a custom field causes the main post content to not display

I've got a custom post type of files I'm trying to list using a new WP_Query. It works fine when I add the shortcode within the main post content. However, when I add the shortcode to a custom field ...
0
votes
1answer
102 views

How to show content of custom fields in search results?

I was able to include the pages where there are custom fields in search results but I managed not to display the content when there is nothing in the content. Is there a way to include the content of ...
0
votes
1answer
195 views

Stripping and/or altering the content of a custom field (video URL)

I’m making a theme where some posts have an associated video, from either Vimeo or YouTube. At the moment, users can add this to a post by adding a video ID into one of two custom fields, called ...
0
votes
1answer
67 views

Sorting editor screen items

When new users log into our site they have to organize a number of screen options in order to begin creating custom fields and editing the site. I would like to force a specific order in which these ...
4
votes
2answers
150 views

Make Custom Field Into A Link On The Front End?

I have set some custom field 'artist' and 'song-name' displaying like: Artist: <user input> Song Name: <user input> My question, how do you make the on artist and song name into a ...
0
votes
1answer
1k views

How to display data from custom fields I created?

I created an options page to ad gigs as custom posts in my theme. This is in my functions.php $config = array( 'id' => 'gigs-info', 'title' => 'Gig Info', 'pages' => ...
1
vote
2answers
354 views

List taxonomy term “Last Name” + “First Name” (taxonomy custom field) in a post loop

I have a few custom fields for a taxonomy "Author". The term title is the Author's last name, and one of the custom fields is his first_name. Now I need, in a post loop, to list all "Authors" of that ...
1
vote
3answers
2k views

Move value from one meta key to another

Migrating question: How would I structure a MySQL query to move the value from one meta_key to another meta_key? eg: I have an old meta_key of "guest_sort" associated with "posts" to ...
0
votes
1answer
176 views

How to organise via Custom Fields on Category Page

I have a custom field named: eventdate The posts are all in the standard post type. I want to order by this field ascending. I have tried over 15 different solutions but no joy . Every post simply ...
5
votes
1answer
7k views

Importing data for advanced custom fields plugin?

I have a member section built using the http://www.advancedcustomfields.com plugin. There are 300 members that each have the following data: Company name Specialism (check boxes) Web address ...
3
votes
2answers
935 views

Custom metabox for menu administration page?

I've been googleing around but failed to find a solution for my need. I'm using wordpress 3.0 and TwentyEleven theme as default pack. In the Dashboard -> appearance->menus that allow user can ...
0
votes
1answer
760 views

Wordpress query by multiple Custom fields and order by date

So here is my query: $args = array( 'post_type' => 'Event', 'posts_per_page' => 1000, 'meta_key' => 'event_informations_show_on_the_homepage', 'meta_value' => 'Show on ...
1
vote
2answers
753 views

How to show custom field's value under post/page title in wp-admin

I'm trying to add the value of a custom field under the post/page title in wp-admin list of posts/pages (much like excerpt mode in posts list) without hooking into the columns process since other ...
0
votes
2answers
781 views

Order custom posts by a date metabox

I have a custom metabox, where I store the date in plain text like this: dd/mm/yyand now I need to order the posts by that date.The custom field is called event_informations_date <?php $args = ...
3
votes
2answers
370 views

How to add new custom page or post blocks?

I would like to add custom contents to post, such as price, options and some others, I dont like to use the custom fields, because always i have to select from a drop down menu, I want these options ...
0
votes
1answer
482 views

Custom Query: query by post custom meta data

So I have a custom post called event, but I need to query only those posts which have a custom metabox(is a checkbox) called `Show On The Homepage: and only if that checkbox is checked. <?php ...
1
vote
1answer
448 views

Passing Custom Field Data as Array to be Saved (Resulting Custom Field Array is inconsistent)

I've been staring at this for hours, and it's clear I'm missing something, but I don't know what it can be... I have custom meta box for adding downloads to a particular post or page. All the data ...
1
vote
2answers
1k views

Alternative to simple fields plugin?

I have been building websites with WordPress for a couple years now, and have become very reliant on the Simple Fields Plugin. Essentially this plugin lets me attach extra fields to the bottom of my ...
1
vote
1answer
126 views

Char limit on custom blog-post form? [closed]

I want to setup a simple custom form for users to post, which will automatically: Subscribe user to updates (i.e. moderation approved, comment posted) Enable DISQUS xor IntenseDebate comments ...
2
votes
3answers
2k views

Add multiple images to a page sidebar

What I am trying to achieve is this: I have a simple page and I want to dynamically add multiple images to it on the sidebar one underneath another. I was thinking about either using meta boxes, post ...
0
votes
1answer
511 views

Custom field outside the loop and inside an array

I am trying to use a custom field inside a widget so it's therefore outside the loop. Taking it a step further, the theme I have is using an array to generate listings which makes it hard for me to ...
1
vote
1answer
451 views

Add More Fields to Users Pages (Admin Panel)

So I'm trying to create some custom fields for users. I need to give users access to a 30 day trial of some software and I want to keep track of that in the users page of administration panel. If the ...
0
votes
1answer
523 views

Get array of posts based on custom field values

I'm looking to pull up an array of posts based on custom field values: function GetPrimaryLinks($product){ echo '<ul>'; $args = array( 'product' => $product, ...
2
votes
2answers
314 views

Autoremove empty custom fields

The code you see below only works sometimes. I'm no pro on PHP so can anyone help me improve this code? I use it in my functions-php file in my wordpress mu setup. The biggest problem is that it wont ...
1
vote
1answer
3k views

Filter by custom field (meta_key) using JSON API

Hi I'm using the great JSON API for Wordpress and would like to filter my custom post types by a specific custom field (using the meta_key and meta_value params). The query in my URL looks like this ...