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

learn more… | top users | synonyms (2)

0
votes
1answer
13 views

php if, else & custom fields - syntax error

I'm just starting to use custom fields and would like to use it to display an author box with (1) author photo (2) author name (3) author bio. I use this code in loop-single.php and it works fine: ...
0
votes
1answer
11 views

Echo out custom fields in comments

I am trying to figure out how to echo 4 created fields from a plugin in my theme template for the comment form and customize the comments output as well. The plugin I am using lets me add custom ...
0
votes
2answers
808 views

get_post_custom single array

Is there a way to return single values only when I run get_post_custom($post_id); it seems that I'm receiving double array, even when there only one value for this meta_key
1
vote
1answer
21 views

Custom page template with custom fields

I need to create a page template that has an image and text with a common style. The image url must be set using a custom field (or something like it) and left aligned to the page title and content. ...
-1
votes
0answers
26 views

How to add repeater field to option page?

I've created an options page for blog. In this options page, I can save some details about the website. using this code: add_action( 'admin_menu', 'site_add_admin_menu' ); function ...
0
votes
0answers
11 views

Sort custom post type by multiple custom fields

I have 4 text fields in a custom post type. How can I sort the posts by this order of text fields: brand_fbn - model_fbn - year_fbn - plate_number? This is my code, which isn't working: $ins = new ...
0
votes
2answers
541 views

How to exclude custom fields from search queries?

I'm building a hotel search engine and I've first created a custom content type "hotel" with Types & Views Toolset. I'm using "Search everything" plugin to query custom fields and custom taxonomy ...
1
vote
1answer
740 views

Auto Populate Custom Field with Complex Value That Increase by One?

Can somebody help me to sort this? I am using WP 3.5.2 and I have "Orders" post type where purchase_order custom field is located. This is the sample of purchase order record: POCOS20130051 PO - ...
-2
votes
0answers
38 views
0
votes
1answer
553 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
0
votes
1answer
18 views

Generating and downloading files with WP API

Lately I was challenged to implement functionality that would allow users, editing specific custom post, to download json file based on meta of that post. I finally managed to complete the task (well, ...
-1
votes
2answers
51 views

Create custom field on post draft or publish?

How to automatically create custom field on post draft or publish with one of several offered values? For example I wish to create custom field named "random_color" with one of potential values: ...
0
votes
0answers
14 views

Get Meta Values and Count based on Meta Keys

Is there a function or a script to get the distinct meta values given a meta key and post type? I was hoping for a function similar to get_terms() for taxonomy. In addition to each meta value, there ...
8
votes
2answers
7k views

Show Custom Fields in Quick Edit

I have several custom fields that I need my client to be able to edit at anytime. For the sake of convenience, I'd like them to be able to edit these custom fields from the Quick Edit. This way they ...
0
votes
0answers
10 views

Add a custom field to WordPress posts which could be filled just once

I am familiar with custom fields, as you know when you filled a custom filled and submit the publish post then you can edit your custom field in edit post page. I want author can fill the custom ...
0
votes
1answer
21 views

How to use TOC with ACF?

I'm using ACF advanced custom fields plugin to create custom fields for my CPT where i replaced the content editor of my CPTs with a custom Wysiwyg Editor field (field name: full_text) from ACF in ...
0
votes
1answer
884 views

Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [on hold]

I've been asked to develop a website pretty much like (but not the same as): http://www.yoursingapore.com/ basically we need to allow people to add Wordpress posts (custom post types) into a sort of ...
0
votes
1answer
362 views

Show Posts in Vertical Tabs with Scrollbar

I have created CPT ( Custom Post Type ) called Recipes. I want to display all me recipe in Vertical Tabs. For Example; check the image below i have created. Image Example Click Here On the left ...
0
votes
1answer
262 views

get posts where a custom field contains a text

I have a custom field where the value contains a comma separated list of items (like: test1,test2,test3), now I want to retrieve posts where the field contains one of the values, I have: $query = ...
4
votes
1answer
1k views

wordpress plugin error handling

I am looking for a way to handle errors for a custom post type with its own custom fields. This is all part of a plugin I'm writing, however, after extensive research the only way I found is through ...
0
votes
1answer
40 views

How to get the first letter from custom field?

I have a custom field 'first_name' created by ACF advanced custom fields. I use this code to get the value from the field: the out put would be something like Mark. What I need exactly is getting ...
2
votes
3answers
450 views

Only show metabox when date-value in other metabox is over?

probably a weird question. I'm using the custom MetaBox and CustomFields Class by jaredatch on Github. I have this "event-date" metabox: $meta_boxes[] = array( 'id' => ...
0
votes
3answers
1k views

Saving Custom Post types and fields to a custom table

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be ...
1
vote
2answers
2k views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...
0
votes
0answers
14 views

Adding filter menu to admin custom type list to filter by custom field values having issues

I've been working on this for a bit and am having some difficulties because I can't understand for certain what is going wrong and why I'm getting the error that i am. It's hard to tell if it's a WP ...
2
votes
3answers
547 views

Title and post URL based on custom fields?

I have custom fields in my custom post type. They should serve as a title and post slug for URL. Basically, whenever I change the content of the custom fields, the title field should react ...
42
votes
2answers
62k views

How can I add an image upload field directly to a custom write panel?

I've added a new page under "Pages" in the wordpress admin, and added several custom fields. I'd also like to be able to add an upload image field to the page editor - is there some way to do this via ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
1answer
30 views

Using ACF Custom Field value in a URL with do_shortcode() [on hold]

I am using the ACF custom fields and video.js plugins and I want to add the custom field value inside the url for the youtube video that is inside of do_shortcode() So far this is what I've come up ...
0
votes
1answer
27 views

How to delete comma from the end of results? [on hold]

I use ACF advanced custom field to add a custom field "authors" to "articles" post type. Authors field is a relationship field which relate Articles post type with Authors post type. I want to display ...
0
votes
1answer
24 views

Meta box not saving spaces

I got a meta-box. And it is almost working as it should. Except that it is'nt saving spaces. For example if I enter London City the data saved will be LondonCity I have taken a look at this SE: Why is ...
0
votes
0answers
11 views

i want to create a shop with single customisable product [closed]

my job is to create signs for clients but every client have his own specification (color,size,text,material ,...) all i want to know is it possible to do that with WordPress and if yes how?
0
votes
1answer
16 views

Does Wordpress support template resources/custom fields

I'm pretty new to Wordpress development but say I want, based on my theme's page template I want to create a custom variable. Ultimately the idea is to create a variable that appears as a field on ...
0
votes
1answer
531 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
1answer
9 views

Get meta value when the page is a blog archive

I'm using custom metaboxes on my pages. For example: header icon. I created a page for the news on my site. I selected it as a blog archive page under Settings->Reading page. Unfortunately I can't ...
0
votes
2answers
469 views

How do I exclude posts by custom field value?

I need to exclude posts that have a custom field 'city' value of 'Melbourne'. After much searching I think the solution might consist of 2 parts. In functions.php : A function to get the post IDs ...
0
votes
0answers
13 views

Add WYSIWYG to Image Description field

I need to build this thing: It's essentially an image with a caption, and it can go inline anywhere in the text. I could just create a shortcode for it I suppose, but I'd really like to integrate ...
1
vote
1answer
9 views

Custom Taxonomy to dropdown box on adminside wordpress

Can I create a country- location hierarchy using custom taxonomy on admin side. When selecting a country from select box , an another box should see the list of location comes under that country. And ...
21
votes
1answer
12k views

How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?

Despite the fact I googled a lot, I've not found the answer to a very simple question : I have some posts with a custom field (i.e. supplier_name). I would like to be able to search and filter my ...
0
votes
1answer
16 views

Why WordPress takes time to make request to save post?

I have around 50 post meta fields, each meta field have different values. I have noticed when saving posts, it takes around 3 to 4 seconds to make request. Why?
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
7 views

How to filter a taxonomy meta field to the 'single_term_title' filter hook

To show terms in Bengali I enabled term meta fields, saving data into options table. I made a custom function (get_term_meta()) similar to post_meta to fetch my taxonomy meta data, that takes term_id ...
0
votes
0answers
18 views

How to add custom sidebar on each single page?

I'm creating a book review site. I wanted the site with two columns (65% 35% respectively). On the left side as usual review of the books and other stuff should go, so no worries with that part. On ...
0
votes
2answers
1k views

How to automatically change a posts status to draft based on custom field

I would like to set a post to Draft automatically based on a custom field date. Note: I am using the plugin Magic Fields. Based on the following code I want to use a custom field 'expiration' to ...
2
votes
1answer
507 views

How to put enctype=“multipart/form-data” in categories form?

I had success putting the code below to include enctype (for images) in custom post type forms, but I'm not able to use it in categories form... is this possible? Thanks. add_action( ...
0
votes
0answers
17 views

Using upload prefilter to add image to custom field - problem with saving

I'm developing a plugin with which a pdf can be uploaded and from each page a jpeg version is generated and added to a custom field (advanced custom fields gallery). I'm using the ...
0
votes
0answers
59 views

Calculate the total of 2 meta values and ORDERBY

I've configured products in WooCommerce to use a point system (either 0 or 1) using Advanced Custom Fields and would like to order the products by these values - there are 9 options in total per ...
0
votes
1answer
413 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
0
votes
1answer
499 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
0answers
7 views

How to add character length condition to WP-CMS fields?

I created a custom module with the help of https://wp-types.com/ plugin. Everything seems fine but I want to include a character length condition for my CMS custom field (NOT FOR THE FRONT-END). ...