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

learn more… | top users | synonyms (2)

0
votes
1answer
67 views

Matching Serialized Arrays with meta_query

I've asked a related question previously, but I think I've finally worked out the crux of my issue. I'm using Advanced Custom Fields and have a number of custom fields attached to my post type. I'm ...
0
votes
3answers
73 views

Order by a meta fiel in query loop

I would like to sort my article from a category by a number added in a meta field. Here is the first step, I get the articles to display on the page. <?php $cat = get_post_meta( get_the_ID(), ...
0
votes
0answers
30 views

Custom field in title

I'm trying to change the posts with no titles to 'custom field' + 'mystring'. So far I got this code. add_filter( 'the_title', 'ta_modified_post_title'); function ...
1
vote
2answers
350 views

Add Paypal Button programmatically

I've setup a post type-Product with custom fields containing price and other attributes. I'm reading Paypal Documentation right now, What i've read till now is "HTML-Buttons" can be pasted from ...
0
votes
0answers
207 views

How to add fields to _wp_attachment_metadata?

I'm developing a custom metabox with the possibility to upload images and give the user the possibility of deciding whether those images are to be displayed on the front end or not, instead of having ...
0
votes
2answers
82 views

Send Multiple Custom Field Values Through the URL

Basically, I'm trying to follow this tutorial to add an action to the pre_get_posts and create a custom meta_query so I can alter the query within the URL and display babies,children and home books ...
0
votes
1answer
75 views

Order posts by separate menu order for different sub-categories

My scenario is as follows: Categories: 1. Category A - Sub-Category A1 - Sub-Category A2 - Sub-Category A3 2. Category B - Sub-Category B1 3. Category C 4. Category D The ...
0
votes
1answer
33 views

CSS conditional on custom field value

I am looking to add some CSS rules to an ID conditionally on the value of a custom field value. Specifically: add to id #firstimg the rules: opacity:0.4; filter:alpha(opacity=40); provided that ...
0
votes
1answer
186 views

Filter posts by custom field (Advanced Custom Fields)

I'm using Advanced Custom Fields and have been following along with this tutorial on Creating a WP archive with Custom Field Filter. In their example, they're using Radio Button Field; I would like to ...
0
votes
1answer
32 views

Custom post type won't take my custom fields

I have written the following plugin: <?php /* Set up the post types */ add_action( 'init', 'mdg_kjdz_register_post_types' ); /* Register the post types */ function ...
0
votes
1answer
100 views

How to create Image gallery Metabox in wordpress [closed]

I want to create a metabox like woocommerce product gallery. I search on google find out related tutorial, plugin, example but unfortunately i don't get anything. So please, anyone can help me. ...
1
vote
2answers
294 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 ...
0
votes
2answers
1k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
0answers
30 views

Get_post_meta returns Array instead of actual value [duplicate]

With the PODS plugin in Wordpress, I've created a custom post type called project. Within project I've created a few custom fields. One of those is project_thumb. The thing is; When I want to display ...
0
votes
1answer
16 views

What is the proper way to add a required field to a post type? [duplicate]

So I created a CPT that has a few required fields in a metabox. My metadata is being saved through the save_post hook but from I can find via my googlefu there is no way to stop the saving of the post ...
-3
votes
3answers
474 views

Post count by meta_key meta_value [closed]

I have 100 posts to the ( states meta_key ), and different meta_value (AK,AR,CA,FL,HW,MN,SC,TX,MN,NJ). I want to show the post count on my site sidebar for posts AK-11 posts,AR-9 posts....
2
votes
1answer
103 views

Automatically assign taxonomy term if custom meta value exists

I currently have a custom meta field for adding a video url to the post. I'd like for the existing taxonomy term "video" to be automatically assigned to the post upon saving if the meta field has any ...
0
votes
0answers
24 views

custom fields multiple image fields

i am building an artist's archive with WP to host a variety of entries (custom post types such as "photographs", "artworks", "publications" and etc.). due to the large quantity of data, i am ...
0
votes
1answer
110 views

Adding custom fields (post meta) before/during wp_insert_post()

Our code base has a ton of logic that executes as the post is inserted/created. However, some of that logic depends on custom post meta. The only way I know of to add post meta to a new post is like ...
0
votes
2answers
42 views

WP Query - Is this correct?

Trying to debug, getting headache so I want to ensure that I have placed the query args in the correct place. I want to sort/order all my posts based on "myvalue". <?php if ( ...
0
votes
0answers
41 views

Self-added mysql column as custom fields value

I am trying to add a value from a column that I've added myself to the wp_posts table as a custom field. So right now there is a column called 'shares' which holds an int value and I want that int ...
0
votes
1answer
97 views

Woocommerce custom fields

I'm using woocommerce plugin in my wordpress web site. In Admin panel for products I've added few custom fields as shown bellow: On my shop page, I want to print the custom field values, and I use ...
1
vote
2answers
4k views

Show values of custom field created with ACF on a page

Im using ACF to create custom fields. One of them is a list of checkboxes that display some options (option1, option2, option3....). and what i need is to show these options on a page in a list like ...
0
votes
1answer
116 views

Advanced WordPress search form based on custom taxonomy and custom meta value

I would appreciate if someone could help me out with the following issue. Here is the thing. I created two select boxes so I could filter and display posts from a custom post type based on two values ...
2
votes
1answer
145 views

Filter out posts before display category count

I have meta key "Due" for posts....if a post has expired (past the current date or not equal to it) then it should not be displayed in the count (i have code to display the count, which fades in over ...
0
votes
1answer
73 views

Adding Custom Fields to Search

I'm trying to add custom fields to my search so that it can be refined by meta values. Currently I have added some select lists to my normal search: <form role="search" action="<?php echo ...
6
votes
2answers
252 views

How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?

I've been playing around with code snippets which add meta data to admin searches. The best snippet I've found was written by Stefano on this question. However, it appears to have 1, annoying bug ...
0
votes
1answer
79 views

Filtering custom post type on a combination of custom taxonomies and custom fields?

I have a custom post type "artist". It has an associated custom taxonomy "artist_type" with terms "voice", "actor", "corporate" An "artist" also has custom fields for gender, location, agerangefrom ...
0
votes
0answers
38 views

Facebook like counter in custom field

is it possible then someone click on like, to take action to update post custom field with counts ? I just found only with http://graph.facebook.com/URL Maybe will be smarter solution ? Or ideas ?
0
votes
0answers
189 views

Add Action Hook function to WP-User-Frontend in a custom post field

I'm using WP-User-Frontend plugin on my wordpress site to allow users to submit posts from the frontend. I only allow users to submit urls. So I created a new form in WP-User-Frontend and gave it 2 ...
2
votes
1answer
2k views

Importing users to Buddypress with custom fields

Here's the setup: The client uses a proprietary custom-coded PHP CMS and is wanting to move to WordPress with BuddyPress. The old, custom CMS has a roster functionality, which I'm using BuddyPress ...
0
votes
1answer
571 views

How to implement a Google map store locator

I have followed the following Google developer doc about creating a store locator usng PHP & MySql. https://developers.google.com/maps/articles/phpsqlsearch_v3 I have this working but now I ...
0
votes
1answer
41 views

How to add an option to admin to add image that could be used as header?

I want to add an option to add/change an Image in admin dashboard in a way that I can call it through code. For example lets call it header_2 Image and then want to use it in an header template. So ...
0
votes
1answer
188 views

Query Problem - Show posts within category 'x' that have a custom field between 'y' and 'z'

I'd like to display all posts within a given price range. For example: When a user inputs 100 and 1000 (in two separate form fields) - my site will display all posts that have a custom field called ...
0
votes
1answer
46 views

How to hide custom fields added by a plugin?

I want to hide unnecessary custom fields added by the plugin "All in one seo" to the Post Edit screen. To do this I added the following code to functions.php: function my_remove_meta_boxes() { ...
0
votes
0answers
109 views

retrieve custom field “latitude, longitude” then add to google map

I need to call a custom field called 'latitude' and 'longitude' and then take those two values and pass them as a pinpoint in google maps. I searched and found this: Pass custom fields values to ...
4
votes
3answers
311 views

Query custom post type by custom field

General Info I used the plugin WP Types (wp-types.com) to create a custom post type called "artist". In WP Types you can also set another post type as parent post type. This is not possible by ...
0
votes
0answers
53 views

Problem importing posts (get_categories is empty)

I want to import posts through an RSS plugin and events through a calendar plugin, and then have these plugins set the category for these imported posts. Then, using a hook (see code below), I want to ...
0
votes
2answers
44 views

If Elseif Query

I'm trying to work this query - the first if clause works, and the else works, but the middle clause, elseif, doesn't work. <?php if(get_post_meta($post->ID, 'TourURL', true)) { ...
0
votes
0answers
43 views

How to call one custom field value if another custom field value is equal to today's date

I'm building a website for a school division in Canada, they help organize their days by assigning a school day to each day of the week. There are 5 school days, and so they do not always end up on ...
0
votes
3answers
39 views

Comparing Dates from custom field

I am trying to compare dates from a custom field. I have them stored as something like "20121125". If the date has expired, a placeholder image will be used, if not, the default thumbnail will be ...
5
votes
2answers
124 views

Tabindex on text input immediately after WordPress title input

The following code adds a text input for a subtitle to the space directly below the title input, via the edit_form_after_title hook. However, when editing the title, pressing tab moves the cursor to ...
-1
votes
1answer
44 views

Add values of post meta fields?

How do I add the values of meta fields in the loop? Say each post has a custom field called "rating" (or whatever) and its got a value of 1 to 5 and its kept in a custom post meta. In the loops when ...
1
vote
3answers
478 views

Query to sort a list by meta key first (if it exists), and show remaining posts without meta key ordered by title

I'm working on a custom taxonomy term page template where we want the items that are connected to the term sorted by a publication date (custom date field) - and if there are multiple items on the ...
0
votes
2answers
38 views

How can meta boxes be added to “unknown” custom posts?

I'm running WP multi-site and I've created a plugin that adds meta boxes to my page and post. add_meta_box( 'Intro', __('Intro'), 'sewp_post_intro_meta_box', 'post', 'normal', 'high' ); add_meta_box( ...
0
votes
2answers
61 views

Using a Custom Field instead of original title field but only for Custom Post Type

I am trying to get a custom field value (Field "bildname") as my post title, and another (Field "bildbeschreibung") as my content in my Custom Post Type. It is not really working though. First it kept ...
2
votes
3answers
126 views

Custom meta fields for specific custom type only

I've got a custom post type curiculum and a metabox that saves a value to a custom field. However this custom field is added to another custom post type (created by an e-commerce plugin) wpsc-product. ...
0
votes
1answer
41 views

How to hide a custom field from admin?

I created a custom field that I would like to hide from the wp-admin (because the system generates it and I don't want user to change it; Hidding it with CSS should be OK in this case), Like this, ...
0
votes
1answer
927 views

3.8 Media Upload and Custom Meta Box

I've been using Tammy Hart's Reusable Custom MetaBox code for some time now but with the recent 3.8 update the media upload seems to be no longer functioning, and the code is no longer supported. ...
0
votes
1answer
26 views

How to validation for sanitize_URL?

Like sanitize_email validation is options available but sanitize_url options is available .if options is not available then how can i do this . http://i.imgur.com/WPYdkTb.png