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

learn more… | top users | synonyms (2)

0
votes
1answer
81 views

I want to understand plugin implementation of custom posts / taxonomies / metaboxes

I want to find a long-term GUI/plugin-based solution to working with custom posts types, custom taxonomies, and custom fields/metaboxes. To this end I have been reviewing all the major custom ...
0
votes
1answer
734 views

Adding a Custom Field to be used by Posts 2 Posts

I'm trying using Gravity Forms and allow for a user to submit a post to my CPT, and choose an optional Connected Post Type. I have two CPTs, CPT1 and CPT2. When they're viewing my form for creating ...
1
vote
0answers
245 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...
3
votes
2answers
335 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
3
votes
2answers
6k views

Add a checkbox to post screen that adds a class to the title

I'm needing some posts to have different title colors than others, and I figured this would be most conveniently accomplished by some sort of check box on the post creation/edit screen. How would I go ...
0
votes
1answer
274 views

Display custom field value as a mailto: link

I'm very confused with an "Email" custom field, how I can make it automatically clickable as "mailto:" link, inside a loop like this: while ( $loop->have_posts() ) : $loop->the_post(); ...
0
votes
1answer
378 views

How to rate a post from Admin Side / Manually?

I am working on a Mini Job Site. i want to give rating to posts manually from admin / editor side Best rated people will be on top. so visitor'll get better choice. visitor are not allowed to ...
0
votes
2answers
404 views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will ...
0
votes
3answers
1k views

Get single image from custom fields made with WCK custom fields creator

I used WCK Custom Fields Creator to create a repeatable custom field for uploading pairs of images (one color, one black and white) to posts. So for example, one post may have three fields, with two ...
0
votes
2answers
722 views

Meta Box Plugin Cloned Fields - Multiple Foreach values

I have the following code that I can't get working. I have two cloneable fields that are being output as one entity (URL and thumbnail image). These are cloned fields using the Meta Box Plugin by ...
4
votes
3answers
1k views

Sort posts by custom field numeric value using dropdown

I've read umpteen answers and questions about things that are very similar to this but I just can't get it to work for my specific situation. I have some posts with a category of "property". In ...
0
votes
1answer
628 views

Getting the Featured image URL and inserting it as Custom Field on Post update / publish

I've tried a number of solutions posted here regarding converting custom fields to featured images - of course in reverse; but non seem to work for me. What I'm trying to do is grab the Featured ...
0
votes
1answer
94 views

Basics: adding template tag to display custom fields in the post

I've just started learning so this might be a noob question. Displaying Custom Fields With a Custom Field added to the post, it's time to display your books and mood to the world. To ...
0
votes
1answer
211 views

Ordering by 'Title' OR 'Custom Field'

I have an issue here that I just can't wrap my head around. Let me jump right into it: Basically I have a site that has 4 order options; -Name Ascending -Name Descending -Price Ascending -Price ...
1
vote
2answers
187 views

Exclude images uploaded via meta boxes from Wordpress gallery

I am using the following simple get attachment code to display all images attached to a certain post but I want to be able to exclude the images uploaded via a couple of custom meta boxes that are ...
0
votes
1answer
139 views

Types plugin isn't compatible with my custom post type

I have a website with a few custom post types. I have also installed Types plugin so I can use a custom field to upload/display images on the home page of the website. I've found that the code seems ...
0
votes
1answer
368 views

How to Create a Frontend Html-list Editable in the Backend?

I would like to add a feature to a page to display a short list of people, like the one seen here. I have done this on other sites by styling lists with css. This time however, it's for a client and ...
2
votes
1answer
41 views

How do I query for a post by custom field?

I have a custom field called "song-id" and I'd like to lookup a post by a song-id value. Can someone give me the code snippet for it? (bonus: also looking for a code to use the permalink in the post ...
1
vote
1answer
429 views

Saving value of a selection option in comment form as comment meta

In a plugin that I am writing I need to let user choose an option from a dropdown list before they post a comment. I used the comment_form action and inserted a drop down into the comment form. /** ...
0
votes
2answers
124 views

Build index page from custom fields

Im starting to delve deeper into Wordpress custom fields and wanting to replicate this page in Wordpress: http://www.clubsact.com.au/corporate/index.php So my site is not tightly structured to a ...
0
votes
2answers
1k views

How can I add/update post meta in a admin menu page?

I wanted to create a plugin to batch manage posts' custom field data. I know I can add post meta by add a meta box in post edit screen and use add_action('save_post','function_to_update_meta') to ...
2
votes
1answer
944 views

Use ajax to update_post_meta

2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved. These are my codes: <?php ...
1
vote
2answers
613 views

Force hide custom field metaboxes

How can I completely remove the custom fields and the collapse button in the Edit Post/Edit Page custom screen, but without removing the capability to add custom fields with a PHP function?
0
votes
1answer
990 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
48 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
918 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
205 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
275 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
663 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
114 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
438 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
971 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
172 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
498 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
150 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
76 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
181 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
652 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 ...