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

learn more… | top users | synonyms (2)

0
votes
1answer
888 views

Custom Field values not Showing in Edit Page of Custom Post Type

Custom Field values not are not showing in respective fields while i click the "edit" button .. they just show blank as we are creating a new post.I am able to save the values in custom field while ...
0
votes
1answer
46 views

Bypassing a Form Options

here is the situation. I am using a plugin and although it is (half) works, I can't access the setting page. The plugin is to fetch thumbnail from Youtube and other video sites, but the problem is, I ...
0
votes
1answer
3k views

Order by custom field date with ASC order

I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC. Basically it's a query that should list posts where the custom ...
0
votes
1answer
52 views

Custom field only on custom post type?

I have added some fields to a custom post type through function add_electric_portfolio_box() { add_meta_box( "electric_portfolio_info", __('Detalles de la web'), ...
0
votes
1answer
874 views

Front-end update_post_meta with ajax

as written in title I'm trying to update a post_meta using Ajax. Actually I'm a complete newbie to Ajax and how it works so, if it is possible, I would appreciate if someone could 'take me by hand' ...
1
vote
2answers
226 views

Custom fields attached to a page template only show on edit screen when page is saved

When I create a custom field and associate it to a custom page template, it doesn't show in the post editor screen until I click save (draft / publish). Ideally, the custom field should show when I ...
0
votes
1answer
202 views

Adding class to last list item? Not WP generated

this one has been getting me for a while. At the moment I have a repeater field with Advanced Custom Fields: <ul id="servicelist" class="clearfix"> <?php if(get_field('homepage_service')): ...
1
vote
0answers
72 views

Show fields based on taxonomy selection in editor

I use GD CPT plugin for custom taxonomies and post types. I wonder if it is possible at all to change the fields user sees in the editor, based on something else (lets say a taxonomy). Example: I ...
2
votes
1answer
255 views

Sort by posts that have a featured image?

I'd like to sort posts on the index page to show those that have a featured image first. I've done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function ...
1
vote
0answers
618 views

filter custom field values $min $max

The user needs to query posts by entering a $minPrice, $maxPrice and a category value. Here is my query which returns no results: function result() { $result = array( 'cat' => ...
0
votes
1answer
113 views

Can't query by meta_key

For some reason. I do not have the ability to query by meta_key when I run a loop. What could cause this and what can I do to the diagnose the problem? I am using wordpress 3.4.1. $args = array( ...
2
votes
1answer
4k views

Custom Meta Field not Working with qTranslate [closed]

I am running the newest WordPress and qTranslate. I have made a page that enables some custom fields that are working ok. qTranslate enables languages like tabs when editing a page. But this ...
0
votes
2answers
1k views

Custom product fields in wp e-Commerce plugin [closed]

I want the user to be able to set a text, option values or other type of data in each product just before they add it to the cart. Just like product options. For example: The user buys a sticker ...
0
votes
1answer
66 views

Allow authors to create article image

I want to allow contributors to upload images while creating posts. But the catch is, I am building the post display pages out of my own custom PHP. Every article written will follow the same ...
0
votes
1answer
431 views

How to set default metaboxes on user creation?

Just for repetition's sake, I want to do the following: I need to set custom fields and the excerpt metaboxes for WP default Posts post type when a new user is created. I know that by default WP ...
0
votes
3answers
940 views

How to select one major category (or custom taxonomy) for a custom post type?

I've created a hierarchical custom taxonomy (genre) and want to use it for a custom post type (radio station). But I don't only want to assign some genres to a radio station. I also want to be able to ...
0
votes
1answer
169 views

Create widget that filters posts on current page based on entered value

Can somebody point me in the right direction wouldnt have a clue how to start programming this. I want to filter post based on price (custom value) thru a widget. So lets say you click on a post ...
0
votes
3answers
473 views

trim custom field text value and show (…)

I am using this code here: <?php $trim_length = 25; //desired length of text to display $custom_field = 'my-custom-field-name'; $value = get_post_meta($post->ID, $custom_field, true); if ...
1
vote
1answer
146 views

Plugins won't recognize my plugin's hidden custom fields

In a plugin i developed i created metaboxes in the new/update post page in the admin area that save data into custom fields. In order to prevent confusion or any kind of issues i created those custom ...
1
vote
0answers
75 views

Custom field query without duplicates results

I have categories as cities like london or new york I also have a custom field called Location where I usually put the name of a restaurant. I am trying to show on a separate post/page all the ...
0
votes
1answer
1k views

wp_editor on custom meta textarea field - images and html fails

So I have made some custom textareas on my frontpage template. This works fine and I can safe content and so on... But I am experiencing some issues. When I click "Upload/Insert" I can work with the ...
1
vote
1answer
2k views

How to Create Dynamic Fields in a Meta Box?

Could someone explain me with a little example how create a button that creates a new custom field dynamically? I'm working on a plugin and using add_meta_box, I need an input box ...
1
vote
1answer
1k views

Get aggregate list of all custom fields for entire blog

So, like the title says, I'd like a single function to get an aggregate list of all custom fields, site-wide (all posts, pages, CPT's). Normally, I do this with a couple SQL statements and juggle the ...
0
votes
3answers
177 views

Only show image from custom field when present

How would I adjust the following code to only show the image tag when there is a variable present in the "imageembed" field? <?php $imageid = get_post_meta($post->ID, 'imageembed', true); ?> ...
3
votes
1answer
85 views

Issue with saving custom post type when editor is removed

This one is doing my head in! I'm using this code as the basis for one of my custom post types. https://github.com/tammyhart/Reusable-Custom-WordPress-Meta-Boxes/blob/master/functions/real-estate.php ...
1
vote
0answers
120 views

Automatic Shortcode Creation with Custom Fields

This is basically a php issue as I'm fairly new to it and can't figure out how to code things the way I want. I am basically trying to pull information from custom fields (grid reference) and post ...
2
votes
2answers
628 views

How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?

I know the question is quite ambiguous. Let me explain: I have a page that lists all posts with a certain value of a custom field. (Eg.: The page Rentals lists all posts with the value rental of ...
2
votes
1answer
2k views

HTML code in Custom field

I'm using a custom field to display images in a slider on each post, but when I update the post after having entered the HTML code in the custom field, the code disappears. I'm assuming that there is ...
1
vote
0answers
544 views

filter search custom field query

I'm looking for way to filter search results. This is what I have so far a custom post type of "doctors" in each "doctor" post, there are numerous custom fields (male or female, location, ...
0
votes
2answers
2k views

How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?

I would like to add a custom Metabox with HTML content in the screens New and Edit Posts/Pages ( /wp-admin/post.php?post=POST_ID&action=edit), so that I could display a list of editorial ...
0
votes
2answers
770 views

pull all posts' meta key values from current category only

I am having trouble figuring out how to pull the meta key values for just one category. I can pull all the meta key values (for meta_key "city") in all categories no problem like this: $querystr = ...
4
votes
1answer
5k views

Creating Photo Gallery System with Custom Post Type

I'm creating a movie blog using WordPress. I have Movie and Trailer custom post types and I want to add a Photo feature for this and I want to add a relationship between this photos and Movie CPT. ...
-1
votes
1answer
69 views

custom field with links

I want to create a custom field, let's say Tickets in which I can store different links for each post. For example: On a post page I have a button called "Buy ticket" which has a specific link, ...
5
votes
1answer
1k views

Filter post listing by meta value which is a date

This question is almost what Im trying to achieve. Create a filter for posts based on a custom field. My custom field is a date and I would like to create a date filter (monthly) based on this custom ...
-9
votes
1answer
8k views

Advanced Custom Fields: how do I check to see if a value is set in an field? [closed]

How do I check and see if a value is set in an Advanced Custom Field?
5
votes
6answers
6k views

How can I make wp-pagenavi work on a custom query built upon a form submission? [closed]

I've also posted this on the wordpress support forums, for scribu's wp-pagenavi plugin: http://wordpress.org/support/topic/plugin-wp-pagenavi-custom-query-form-submit-part-2?replies=1 My situation: ...
0
votes
1answer
237 views

Show array of meta_value in Edit Post Coloum

what I'm trying to do is add a new coloumn to Edit post page (done) and in that coloumn show data taken from a set of custom fields (partially done). This is my code (I use it as a plugin so it ...
0
votes
1answer
727 views

Adding custom field and querying from post table

I've been trying to figure this out for a while now. So I'm trying to add a custom field call "counter" to every single post. I try simply inserting the field "counter" to the post table. Every time a ...
0
votes
1answer
573 views

Plugin that lets visitors Like a post (not facebook) and stores likes in custom meta?

Does anyone know of a plugin that has a like feature or thumbs up down etc which stores these likes as custom meta data? Not a facebook like. I'm currently using WTI Likes which stores the data in a ...
1
vote
2answers
445 views

Getting a “Changes you made will be lost” dialog prompt on a custom post type page

I have a simple custom post type setup with a few custom fields. All seems to be working ok until on the odd occasion I get the dialog box you normally see if you try to navigate away from a post/page ...
0
votes
1answer
432 views

Permalinks: custom structure for taxonomy - tags?

In my Wordpress permalink settings I have set the Tag-Base to "". So /tag/whatever is the current-url structure for my tag-page. However I do have a custom-post-type with a custom-taxonomy that is ...
0
votes
1answer
203 views

After moving my site from a dev subdomain, to root, all my custom meta data is gone

I just movde my site from a dev subdomain, to the root. I have extensive amounts of data saved in custom meta fields which I created with the WpAlchemy class. All of this data is not appearing in ...
1
vote
2answers
460 views

WP Query Returning All Posts

I have a custom WP query that is returning every post, instead of just the ones being specified by the query. I can't seem to find anything wrong with the code, so I must be missing something: ...
5
votes
1answer
259 views

Need small coding with Custom Fields Search

WP Custom Fields Search is a great plugin but I've a problem regarding the plugin returning results using the homepage. When I click the submit button, results are shown on the homepage instead of ...
1
vote
1answer
106 views

Random image from tag/custom type on sidebar

How would I pull a single random image from custom post type "athletes" and the custom image field "athletethumbnail" to be displayed in my sidebar? (I have PHP enabled for my text widget on sidebar.) ...
0
votes
1answer
254 views

Undefined Variable (Displaying image via custom field)

I'm getting "an undefined variable in line 6" while trying to display an image from a custom field. It's pulling the name/link of file; but not image. Here is my code <?php query_posts( ...
0
votes
1answer
56 views

Radom post image/link based on custom taxonomy

How would I make a widget to display a random post's image and permalink? I would like it to pull from a specific custom content type and only posts have set the custom field of "featured" to "yes".
0
votes
1answer
41 views

I would like to display different text on different pages

I have at the very top of my page a line of text within a h1 tag thet I use for seo reasons. the text and html around it is written in my header.php. but I would like to write differnet txt so it ...
0
votes
2answers
320 views

Automatically assign a custom post to a custom taxonomy based on custom field value

We have a custom post type called listings, and each listing has a custom field zipcode (which is a 5 digit number). We then have a custom taxonomy area, which can be "New York", "Los Angeles" etc. ...
1
vote
1answer
414 views

Ordering posts by date custom field

Trying to order posts by custom field. Dates are entered into the custom field "event_time" as in this format: "June 6 2012 6:00 PM". Trying to order them by that date. All of the code below functions ...