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

learn more… | top users | synonyms (2)

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). ...
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
0answers
8 views

Render custom gallery fields

I'm trying to add a custom setting field to a gallery and render it as a class in the HTML. So far I have implemented this solution which works perfectly. Here is the working code: function ...
3
votes
1answer
353 views

Change post format using custom field

I'm creating a theme using the CF Post Formats plugin. But I've run into some trouble I don't know how to solve. Here's what I want to be able to do: Create a new standard-format post Enter a url ...
0
votes
2answers
484 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
23 views

WordPress Search Custom Meta Field Only

I have a recipe site where each recipe resides in a custom meta field called "recipes". I only want the contents of the meta field searched when users search the site. The problem with my code below: ...
2
votes
2answers
924 views

Save Custom Fields for Variations Product

Currently I am using WooCommerce for WordPress and trying to add custom fields for Variations Product. After did some researches, I found some code and tried to modify it. This is my full code : ...
0
votes
3answers
2k views

Getting Bootstrap accordion working in Wordpress loop with custom post type (collapsing issue)

First off I am well aware that there is a plugin but I am NOT talking about the BS Short code plugin. I am talking about the actual bootstrap accordion. So here is what I am trying to accomplish, I am ...
0
votes
1answer
453 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
2answers
70 views

woocommerce custom field not updating user meta

I have a custom field created on my woocommerce checkout page that saves to db and shows on the order page. I want it to also update in the user profile as it won't change very often (if ever). The ...
0
votes
2answers
960 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
0
votes
2answers
557 views

Attach images to posts using custom fields (just paths to images already upld)

I'm setting up a real estate website, which i make listings using a custom post type 'listings' in which I have multiples metaboxes for beds, baths, and all other informations. I use a plugin to ...
1
vote
1answer
20 views

how to filter by last name for custom post

I have a custom post type (speaker) and I would like to load the list of speakers sorted by last name. I can't seem to figure it out. I tried the code from this post: ...
0
votes
2answers
1k 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
96 views

Checked() function on a multidimensional array

I am generating checkboxes dynamically on one of the option pages. This the code that I'm using to create multiple checkboxes: <?php foreach($shopCategories as $shopCategory) { ?> <input ...
0
votes
0answers
30 views

Bulk Edit Media Including ACF/Custom Fields

I have two main questions but here's the scenario. I run a festival website. Photographers will upload photos to the site. They will need to relate it to an Artist and an Event, so when viewing the ...
0
votes
1answer
7 views

Saving and using Custom Field in user settings/profile “Checkbox list”

Referencing this question: How to add/save Custom Field in user settings/profile "Checkbox list" I've been trying to get this working, but am having a few issues. I'm using the following ...
1
vote
1answer
4k views

How to add/save Custom Field in user settings/profile “Checkbox list”

i have been working on a custom system for my site where users can have a seperate account, setting and profile page to make my site a bit more interactive and community type. with some other ...
0
votes
2answers
403 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
5answers
3k views

Preserving line breaks when saving and displaying custom fields data

I'm collecting data via a form plugin and saving that data in form of a post with several custom fields. I then display the content of the post and the custom fields on my post template using... if( ...
0
votes
3answers
390 views

Order by a meta field 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(), ...
1
vote
2answers
18 views

I want to send an email when each post is published

For each post, I want to send an email once it has been published. The email address is stored in a custom field. I have added a custom field . I have got your_email for the 'name'and the value is ...
0
votes
2answers
390 views

Setting a custom $query->query_vars['meta_key'] breaks the WordPress menu

First of all, my problem is very similar to this one: http://stackoverflow.com/questions/10629245/wordpress-menu-disappears-when-query-query-varsmeta-key-is-set However, the answer accepted for this ...
2
votes
2answers
379 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
0answers
17 views

Query for showing posts where the gallery custom field, ACF gallery custom field plugin, is not empty [closed]

I'm using the gallery add-on for advanced custom fields wordpress plugin to add images to individual posts which I then display as a gallery using liquid slider. On a single post page I display the ...
0
votes
1answer
899 views

Getting Custom Fields from WordPress JSON API

I'm using the plugin (https://github.com/WP-API/WP-API) to get JSON Data from WordPress, but I'm stuck on something, I've a custom post type, events, with which many custom fields is attached to, such ...
7
votes
4answers
28k views

Custom query with orderby meta_value of custom field

Aa you know, as of WP3.0 there are options for custom advanced queries, which is great. As of this, some query parameters of custom fields like meta_key, meta_value were deprecated for the new ...
0
votes
2answers
17 views

Make a custom column sortable by a value from a different custom post type

I've created some custom columns to display my custom post types more attractively in the admin section - the columns are mostly custom fields. Mostly, this works absolutely fine, and I can sort by ...
0
votes
1answer
32 views

Creating a widget with a number of custom fields

I am attempting to create some custom widgets. I have created one, which only needed a different title field. However I am now stuck when trying to create a widget which allows me to have multiple ...
0
votes
1answer
14 views

Text in header as a page - hide from Web crawlers

In some parts of my template, like in the header of my Wordpress website, I have custom text like "Any question ? Contact us: +33 00 11 22 33". These texts are managed as a page : in the template, I ...
0
votes
0answers
13 views

Custom Post Type On Publish Update Meta Field

I'm wondering if someone can shed some light on how I can update a custom meta field value, when a new post is created in a custom post type? Specifically, I have a custom post type named ...
2
votes
2answers
628 views

Save HTML formatted data to post meta using add_post_meta()

Array ( [post] => Array ( [jw_objective] => Exposure to e<b>nd to end development</b> of various applications; right from requirement analysis to system ...
0
votes
0answers
18 views

Custom Metabox Always shows box and checked

I am running the below code to create a customer metabox on a page if a specific template is applied. Everything shows up fine however there is a problem. If I tick the box and save the page loads ...
2
votes
1answer
63 views

Execute/Parse Shortcode in Native WordPress Custom Field Value Field

I've spent some time searching for a solution but have not found 1 single example of how to do this. I would like to place a shortcode in the value field of the Custom Field meta box in WordPress so ...
2
votes
1answer
732 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
0
votes
1answer
18 views

Add a custom class to the body tag using custom fields

There are certain posts where I want to manually append a custom body class to using custom fields. How do I go about it appending the class to the body tag when a certain custom field is added to a ...
0
votes
3answers
25 views

Need help getting a certain value out of a multi dimensional array

I'm looking to retrieve a specific meta value for users from the Wordpress types plugin. I know the value is stored in a wpcf-team-experience-member-type. This is a checkbox option and I'd like to ...
0
votes
0answers
16 views

Query key values within current taxonomy

I have custom field: cb_color - with different values. (ie: blue, red, brown, ..etc) I have this code inside the taxonomy template file. It queries and outputs the correct values - matching posts with ...
4
votes
1answer
128 views

So much data in postmeta

Last year started using custom fields and in one year I have 230,540 rows in wp_postmeta table. This year will add more data and new fields and I don't know what to do, to create new table or continue ...
0
votes
0answers
38 views

Order Custom Field by Price

First of all i've found numerous, topics, and, issues about ordering a WP_Query by its custom field value, but somehow all the proposed solutions don't seem to work for me. I have a custom field ...
0
votes
1answer
15 views

Publish post and create additional posts with same content

I'm building a site which allows authors to create a custom post type, and optionally elect to create X amount of additional posts with the same content. In this case all the content is meta values. ...
0
votes
1answer
52 views

Query Posts by Custom Field

I'm looking to query my posts via a custom field that I've created on my page. But the custom field is an array of values. So the custom field 'country' could look like this country => ...
0
votes
0answers
16 views

Meta Query Filter by Tag

I currently have multiple pages, and in each page is a custom field which is named 'country'. In the 'country' field I have this value 'uk, usa, brazil'. What I'm wanting to do is display posts on ...
1
vote
1answer
31 views

Complex WP_User_Query call fails on production server

I'm having a very specific and hard to debug problem with a complex meta_query in a WP_User_Query call: I'm using this (simplified) code to built the query: // custom user role $arguments = array( ...
0
votes
2answers
488 views

Bulk move (or copy) from a custom field to the post content?

I need to move (or copy) the contents of a custom field into the main post body, replacing any existing content. I need to do this for a few hundred posts...Is there a quick way of doing this? I can ...
1
vote
1answer
363 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
0
votes
2answers
681 views

Why am I getting a “Call to member function format() on a non-object” error?

I am trying to add a hook to post saving using WP Frontend User When the form saves and the post is created within the "save_post" function I am trying to find the value of a custom field ...
0
votes
1answer
39 views

Show comon custom field results?

There is custom field "color" in posts with set of hex color codes (all in one custom field, separated with one space). Examples of custom field values for 5 posts: "000000 f0f0f0 c0c0c0 202020 ...
0
votes
1answer
48 views

Search one custom field?

In posts there is in custom field named "color". I have custom search page template, and I would like to show search results only from that one custom field. How to limit search to look just in one ...
0
votes
1answer
1k views

How to delete file uploaded by Plupload

I follow the steps from here to integrate the plupload in metabox. Everything is working fine. But I do found one disadvantages of this guide. When I click 'Remove' link from the uploaded images, it ...