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

learn more… | top users | synonyms (2)

0
votes
2answers
1k views

Build Array from Input Fields question

I have a series of input fields sets: <input type="text" name="people[name]" /> <input type="text" name="people[lastname]" /> <input type="text" name="people[email]" /> <input ...
0
votes
1answer
998 views

Multiple single templates?

Lets say i have a custom post type called 'event' that has several custom meta boxes for images, docs, etc.. Would it be possible to have two different single templates? For example: i have a page ...
0
votes
0answers
32 views

How to Pull Out Twitter Summary Data in other areas of my template?

I am curious on how www.gigaom.com is able to callout the summary data of their articles. In addition I am trying to figure out how the summary autoposts when you select the tweet this button and the ...
0
votes
1answer
682 views

saving/reading custom field value does not work - no value gets POSTed

I am trying to add a custom field to all my posts and of course saving/reading the value. As a starting point I took the example from the Wordpress Codex and stripped it down to bare bones. I know it ...
0
votes
1answer
249 views

Use custom field as tag slug

I am trying to replace 'tag-slug' with a custom field value, so it will automatically pull the tags that match the custom field 'my-tag-slug' The code below does what I want <?php if ...
0
votes
2answers
402 views

WP Insert post with post_thumbnail

Insert post thumbnail with 'wp_insert_post', i'm trying this code but does not work, the field 'get_field('imagem_do_produto') returns the url of the image, why not work? <?php $exists = ...
0
votes
2answers
736 views

Custom Taxonomy dont save in a frontend form for post a custom post

I have a Dropdown Categories .. <?php wp_dropdown_categories('taxonomy=faenas_combenef_category&hide_empty=0&orderby=name&order=asc&name=location') ?> And my post Process... ...
2
votes
0answers
98 views

How can I append custom data to images in the editor?

I've added a custom meta field to my image details so that a client can add a number to their photos (a design choice). The data would need to show up under each image (like a caption) inserted into ...
1
vote
1answer
552 views

WP_User_Query pulling ACF to loop

I'm using following code to display my users on template <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $paged -= 1; $limit = 100; $offset = $paged * $limit; $args = ...
0
votes
2answers
219 views

Insert posting automatically based in acf field

good day I found a code that works, but it creates several posts of the same name, do not want that, he wanted to create only once post_type if the value is 'x', but he is creating a 'x' every time ...
0
votes
0answers
184 views

convert Custom Fields Option-Values to Tags/Taxonomy

I have Custom Post Type "Places". In that I have Created Custom Fields. Like: Option Title » Type of Pub Option values » Sports, Rock, Biker, Beer, Live Band, Restro, Gastro, Irish, ...
0
votes
0answers
54 views

Make each Value of custom field show related posts when clicked

i have create a Custom Post Type calle "Places". I have created a Custom Field with Field Type "Multi CheckBox" Option Title "Type of Pub" Option values "Sports, Rock, Biker, Beer, Live Band, Restro, ...
0
votes
2answers
99 views

How to display Multi Checkbos select Custom Field on the post?

i have create a Custom Post Type calle "Places". I have created a Custom Field with Field Type "Multi CheckBox" Option Title "Type of Pub" Option values "Sports, Rock, Biker, Beer, Live Band, ...
0
votes
1answer
124 views

I want to split this into two functions

This code i will add below is for Custom Fields for Custom Post Type and GMap for Custom Post Type. Currently both are pulled by this function. I want to seperate both. One for Custom Fields and One ...
0
votes
1answer
29 views

Custom Fields - How can I remove the publish option for certain users

I am trying to set updates to Pending vs. Publish for a new role I created called "members". Is there a way to remove just the Publish option for these users? None of the user plugins I have tried ...
0
votes
1answer
441 views

Add Extra Category Field to CPT Categories

So I'm able to add an extra field to my categories (A Color picker actually, to color code categories - pretty cool stuff if anybody is interested) but the extra field ONLY shows up under Posts. I ...
1
vote
2answers
2k views

Filter archive.php by custom meta

I"m trying to filter an archive page by custom meta query. I've tried using query_posts($args) prior to the loop, but it returns nothing. Any ideas? Here's what I have so far: <?php ...
0
votes
2answers
2k views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
1answer
138 views

custom field suit new post with in custom fields

how can i use Custom Field Suite (CFS) https://uproot.us/ to create new posts in post type. what am trying to do is create a music albums using post then create new post based off the tracks in the ...
0
votes
1answer
28 views

help for user login

please help, I have to restrict some users based on the value of some metadata.for eg:if the account is not verified by admin(a metafield like "adminveri" will be zero), then the user should not ...
0
votes
1answer
590 views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
0
votes
0answers
58 views

Analyze uploaded images to get colour values

I have a site that uses large background images, uploaded by the user, that has content on top of it. I'd like to be able to analyze the image and apply a class to the body that will have black text ...
0
votes
2answers
195 views

Can i categorise my meta box?

I have this code <?php $prefix = 'wtf_'; $meta_box = array( 'id' => 'propertybox', 'title' => 'Property listing details', 'page' => 'listings', 'context' => 'normal', ...
0
votes
0answers
81 views

What is the best way to sort posts by a custom algorithm?

I'm wondering what is the best way to sort posts on homepage using a small algorithm like custom_field_votes / ( post_hours_old + 2 ) ^ 1.8 I have tried creating a new custom field with the result ...
0
votes
2answers
455 views

Wordpress custom upload field error

I'm creating a custom upload field for a wordpress theme that uploads pdf files.The code is: function custom_news_meta_box($post) { $file_name = get_post_meta($post->ID, 'file_name', true); ...
0
votes
2answers
480 views

How to Wrote Simple Calculations by Using Custom Fields in Loop?

I am building a website with whole bunch of custom fields and need to implement several custom fields that will auto calculate values by using values from other custom fields. All files which I need ...
0
votes
2answers
29 views

Turn Current Date in Custom Field Ouput Green or Red

Using a custom field of "Due" how would I change the current date to green or red depending on if it has expired or not? Could someone point me in the right direction? My meta key is simply "Due"...
0
votes
0answers
86 views

Help sorting by Meta Key value

using this https://github.com/growthspark/wp-advanced-search I am not sure how to sort by meta_key value. I currently have a meta key called "Due Date" with the date entered like 06/06/2012 (M/D/Y). ...
0
votes
1answer
299 views

How to keep sharing stats after creating 301 redirects?

I recently changed a lot of URLs for SEO purposes and realized that all of my Facebook likes and Twitter tweet counts were lost on posts created prior to yesterday. Posts created since yesterday ...
0
votes
1answer
117 views

Repeatable Custom Field for Media Upload

I am following this topic to add a repeatable custom field for my Custom Post Type, but I cant get it to work for a media upload, Which will allow the author to add multiple image by uploading or ...
0
votes
1answer
318 views

Read more to open external link

I would like to have custom field in post editing area where can be putted the external link. If the link is entered to this field then read more button on homepage would open external link, but if ...
0
votes
2answers
3k views

How to save media files under custom folder without changing wp-config.php or changing media settings

I want to upload images in a unique folder. Then retrieve the path of this image saved on server like http://example.com/wp-content/uploads/myimages/image1.jpg Now I want to save this URL in a post ...
0
votes
1answer
68 views

Change event firing in wordpress

I have to run a function when a post is published. The function checks a custom meta value and works accordingly. I am using couple of hooks for this purpose: new_to_publish draft_to_publish ...
0
votes
2answers
54 views

Is there a (sane) way to get all custom fields for a post, which do not have a leading underscore?

I know about get_post_custom(), but that returns all custom fields, including those with a leading underscore. Is there a reasonable way to get only the ones without a leading underscore? Would I just ...
0
votes
1answer
414 views

Users Select inside custom metabox

I'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). I want to add a select drop down in my metabox wich is populated from the users with multiple roles ...
0
votes
1answer
73 views

HM CMB: Role Select

I'm using human made's custom meta boxes framework (https://github.com/humanmade/Custom-Meta-Boxes). I want to add a select drop down in my metabox wich is populated from the roles on my WP site. ...
0
votes
0answers
87 views

Limit Form Access and Require Some Fields

I have gotten a "post from frontend" php code example, and I have tested that it works for my site. But I found that it can't define only logged in user to submit post. Also the code can't display ...
1
vote
1answer
313 views

How to reload the role specific registration form on validation errors?

I test a solution for separate registration for different roles and it works very well. But the validation part/function (see bellow) on errors reloads/reuses the generic registration link and not the ...
0
votes
1answer
267 views

Custom classes for attachments

I'm trying to create a custom field in ATTACHMENT DETAILS section. I want to add in this field multiply words separated by space which will be than added as a classes to particular images. This is ...
1
vote
1answer
2k views

How to get custom metabox image field?

i have custom metabox with the image field, i can upload image from wp-admin to this metabox, metabox code array( 'name' => 'Burst Image', 'desc' => 'Crop your image to ...
0
votes
0answers
55 views

Administrator can rate user's posts

I'm trying to figure out how something like this can get done: Each user's post could get rated by administrator in backend (admin area) and he see the total points of each user in users list at ...
2
votes
3answers
1k views

Add custom field to existing meta box?

First off, I have been able to successfully implement custom fields within a custom meta box in Wordpress. I understand how this works. My question is, is there a way for me to add a custom field to ...
0
votes
2answers
1k views

use get_posts to get custom field data, but in one array

I've run a get_posts query in WordPress and need to pull a pair of custom fields and get all of them into one array. The get_posts query provides an array of posts, but when I use foreach to access ...
0
votes
1answer
132 views

How to overwrite a value for a custom field?

I have created a custom value called source it is retrieved inside a theme where it goes href="" place. Now when I want to add a new value to source in the Post, it just adds up to the value instead ...
2
votes
2answers
524 views

Date, Time, and Timezones

I am a bit confused about using dates/times along with timezones in WordPress. I have the following questions: What is the purpose of the timezone setting in the Admin -> Settings section? Assume ...
0
votes
1answer
208 views

query specific posts according their custom fields, using sql SELECT

My posts have a bunch of custom fields, to help insert and display custom info easily. I am trying to build a search that would select and display posts according values of specific 2 custom fields. ...
0
votes
2answers
997 views

Query based on custom fields start and end date

I have a custom post type called Events, with 2 custom fields, start date and end date. These fields are stored using a timestamp in the database. I want to create a custom query based on these 2 ...
2
votes
1answer
252 views

How WordPress autosave can save plugin fields?

Setup: WordPress Add/Edit Post/Page A plugin that have its own postbox with several hidden fields. Issue: How these custom hidden fields can be saved along with the other post data within the ...
0
votes
1answer
70 views

Data URI in custom fields

My theme has an option to specify the thumbnail using custom fields. post_thumbnail - http://domain.com/uploads/xx/xx/mythumbnail.jpg I would like to use data uri instead of the the image in the ...
0
votes
1answer
152 views

Show a custom field instead of username in the backend author area

I'm building a new WP site with about 1200 authors(which are actually companies, pulled from my client's existing site), each attached to at least one custom post type. My problem is the admin(our ...