Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [custom-field]

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

0
votes
0answers
3 views

Custom sortable columns not clickable [duplicate]

I have attached several custom columns to the WP users which are displayed in the admin Users list. I have made the columns sortable in that I've set up the ordebry and order GET params to filter by ...
1
vote
1answer
18 views

Sort by two dates. Default entry date and custom field if present

I have a custom post type where there is an option to sort by date. There is however a custom date field that allows changing the display date. This custom date field is not always filled. Right now ...
1
vote
1answer
23 views

Display link to taxonomy archive only if it has posts with certain custom field values

Posts on my site describe future events, with the event date recorded in a custom field in Unix time. Generally, only upcoming events are relevant to visitors. As such, I'd like to display ...
-2
votes
0answers
15 views

Sort post by meta key [on hold]

if(get_post_meta(get_the_ID(),$field,true) && $field == 'is_this_a_job' && (get_post_meta($post->ID, 'meta_key', true) == 'last_date') && (get_post_meta($post->ID, '...
0
votes
0answers
11 views

gallery with post category and custom fields

I'm trying to create a YouTube gallery where i use Posts to get info of the iframe and Feature image. I've built the following gallery: <?php global $post; $args = array( 'posts_per_page' => -...
0
votes
1answer
12 views

Get all user meta_keys and then group users by matching values

One of the plugins I am using generates user meta from our AD. One of the keys is the user's Manager. As many users will have the same manager, I want to be able to group all users. I was trying to ...
1
vote
0answers
15 views

Bulk append custom field to post content

I want to bulk append my custom field named 'LINK' (with data like 'http://domain.com') to the end of the post content, so I can go back to using a standard theme with no support for custom fields. ...
0
votes
0answers
32 views

How to prevent other metaboxes from moving when inserting your own custom metabox?

This code below is making other fields all move to the side. I was only trying to make the new custom metabox move to the side. function vmo_code_enable_metabox() { $screens = ['post', 'page']; ...
0
votes
2answers
26 views

How to order posts on each different category?

In wordpress, right now only on my main blog page, I managed to sort all posts with: <?php if ( is_active_sidebar( 'blog-category' ) ) : ?> <?php dynamic_sidebar( 'blog-...
1
vote
1answer
39 views

How to get Metabox custom field to show checked if value is updated using post meta query?

I have two radio buttons as custom metabox fields for pages/posts. One radio button has the value of "enable" and the other has the value of "disable". My radio buttons will stay checked only if I ...
1
vote
0answers
24 views

Custom Field Values not updating unless I click “Update” twice

I wanted to save custom field values to the revision history. The following URL had code that helped me achieve that (http://carolandrews.co.uk/saving-revisions-for-custom-post-type-meta-data/). The ...
1
vote
1answer
21 views

How to add a title field in comments?

Just like WP posts have title and text, I want to have titles to my comments. Now how do I add it and show them above the comment texts like a title. I need it to have a css name as well. The title ...
0
votes
0answers
5 views

Checkbox with multiple choice, custom fields problem database record and missing line break in the custom field description

Currently creating a website in Wordpress during an internship, I created a custom message type with a checkbox multiple choice but also a description field with the wordpress editor I encounter a ...
0
votes
0answers
11 views

Line break description wordpress

Currently in Wordpress 5.1, I create custom fields including a description field using the text editor of worpress, however I encounter a problem no line break is made. Is there a function for the ...
0
votes
0answers
30 views

Sort custom post archives by a meta value from a different custom post type?

To make a long story short, I have a custom post type called artworks with these meta fields: title catalog_no artist_key I have a second custom post type called artists with these meta fields: ...
1
vote
1answer
23 views

Adding Custom Text Area to WooCommerce Product

Some of the products in my store has quite long descriptions. Therefore I want to use the main Description for just a basic description and add an extra tab for i.e. Technical Specs. I'm using the ...
0
votes
0answers
13 views

Is it possible to capture User-based ACF fields during MemberPress signup?

I know that MemberPress gives you the ability to define custom fields. However, we have a series of ACF [Advanced Custom Fields] that we have defined for our users, and would like to capture some of ...
1
vote
2answers
63 views

Problem fields custom date, time, and checkbox

I created a custom post type with custom date, time and checkbox fields. I'm having a problem with the date and time fields that do not register in WordPress Administration or in the database. And ...
0
votes
2answers
30 views

Change WordPress custom field default calendar [closed]

I have a custom post type called X, Post type X has some custom fields, one of these custom fields is date, <input type="date" name="date_added" id="date_added" class="regular-text" value="<?...
1
vote
1answer
19 views

How can I pass a variable set by ACF to header.php?

I have created a custom field with Advanced Custom Fields for my posts. My variable is set product_image, so I can print it with: <?php the_field('product_image'); ?> But I need to print it in ...
1
vote
1answer
37 views

wp_editor() usage in custom meta box

i am building a custom meta box having a classic editor input rather than just input. The reason for using wp_editor is that I wanted to add paragraphs of text inside div but the simple input escaped ...
1
vote
1answer
26 views

Using custom field content as expression in IF statement [closed]

I want to store some conditional logic in custom post types , and then use these in a plugin to generate new content based on the logic. Eg if a user submits a form with “body temperature”, a ...
0
votes
0answers
14 views

Add a custom variable to Woocommerce Follow-ups plugin

I am trying to add a custom variable to Woocommerce Follow-ups plugin. In the documentation they have created a sample function for this witch can be viewed here: https://gist.github.com/75nineteen/...
0
votes
1answer
41 views

Allow HTML in Custom Metabox area

I know there are many questions related to my question, but sincerely i was unable to get solution. My question is simple, how can i allow html in textarea in custom metabox on post. So far i have ...
-2
votes
0answers
37 views

How to store large amounts of data in a custom field

This question has been similarly asked before without any real conclusion. The LONGTEXT max for MySQL is 4,294,967,295 characters. But wordpress is refusing to save custom meta that is 2,000,000 ...
0
votes
0answers
30 views

Custom Fields Not Showing (ACF not installed)

Custom Fields not showing on edit page. When I look at Screen Options it doesn't even show up. I've looked around for a while and saw that people who had the Advanced Custom Fields ran into the same ...
0
votes
1answer
32 views

WP_Query, ACF field and array

First of all, sorry this title, I really don't know how title the question without write a blobtext! :) Anyway, my problem is this one: I have a custom post "Risorse" (en: Resources). It supports ...
0
votes
0answers
30 views

Custom Field URL + description

I'm trying to make some post with has many URLs with descriptions attached to it, the ACF has the URL module wich is fine, I can add many URLs as needed but I need to add a description to each of this ...
0
votes
1answer
17 views

How add multiple wp_editor_box to new post

I am trying to use multiple wp_editor_meta_box to my posts for custom post_meta but the problem is when I use the same codes for each of them there is an error Fatal error: Cannot redeclare ...
1
vote
2answers
29 views

Get all Posts If has same custom field values in Posts

I am trying to get a list of posts if has same zipcode values. Thanks in advance for the help. <?php $query = new WP_Query( array( 'post_type'=> array('service'), 'posts_per_page' => -1, ...
1
vote
1answer
18 views

Auto delete post if certain custom field data is empty

This question can be stupid but I really need a solution for it.. I am generating classified post using cron job. I have some custom filed as well with the cron job like 'source_link'. Sometimes that ...
0
votes
0answers
14 views

How can i export extended user data groups-names?

I have made a website using BuddyPress and i used the feature "extended profile fields". But i have a problem. When i export the user data, the built-in buddypress "export script" in (buddypress/bp-...
0
votes
0answers
13 views

How to use get_{$adjacent}_post_where

I am new to php. I have a wordpress site in which I have setup a custom field show_post of type True / False. I want to use previous_post_link and next_post_link, to only showing posts that have the ...
0
votes
0answers
13 views

Use custom field content in menu-item

I'm making a mega-menu with some menu-items that can have a more rich content (from a wysiwyg editor using ACF custom fields). So, i have set an ACF field group to work with menu items, i need that ...
0
votes
0answers
17 views

Why does my numeric meta query work only on one meta key and not the other?

I have a meta query I'm building as part of a woocommerce product filter. We have two meta queries that can run together or separately depending on what filtering is selected. The intention is to ...
1
vote
1answer
36 views

Let users track progress by entering a number daily in profile?

I'm building a WordPress site for a reading challenge where users will sign up for an account and visit the site daily to enter the number of pages they've read. I'm using BuddyPress for the user ...
2
votes
1answer
68 views

How to return Meta data from the REST API?

I added meta box City and Location to my post, but when I calling the endpoint (by WP Rest API) /wp-json/wp/v2/<post_type>/<post_id> it's not returning my meta data. I tried to use ...
1
vote
0answers
14 views

Meta Query Not Returning Output Despite Having Matching Values

I am formulating a query to pull from a custom post type, with values matching a custom field. The results are blank although I have 3 values set matching the custom field. Is my query formulated ...
0
votes
0answers
20 views

How to Create URL Call-to-Action button with custom field?

I Searched around the wp-StackExchange and found some answers related to custom field problems and learned that a Custom field is the recommended way to create a Call-to-action URL button. I need a ...
0
votes
0answers
13 views

Calculated Fields Form integration with WooCommerce “Products,” “Cart,” “Checkout” or any invoice

How can I integrate an order form I created (custom) in 'Calculated Fields'(CF) plugin with WooCommerce "Products," "Cart," "Checkout" so my customers will get a cost total / quote in real-time? My ...
0
votes
2answers
18 views

How can I add a simple custom field to my plugin?

I have a custom plugin that I'm trying to edit. I didn't develop the plugin. I just need to add a textarea to it and save the contents. I have the field added, but I can't get it to save. This simply ...
0
votes
1answer
18 views

How to display custom fields as table in Woocommerce

I imported around 7000 products into a WooCommerce project I'm working on, and each product has specifications, and I would like to display them in a table, like something you would see on Amazon for ...
0
votes
0answers
13 views

Show Custom field value instead of title in WP Menu

any idea how to display custom field values (I am using acf for those) in a Wordpress Menu instead of the respective wp_title? Have nothing to show, as I have nothing tried yet, as I haven't found ...
0
votes
1answer
51 views

How to save multiple custom user profile fields using repeater JQuery

I'm trying to create a multiple custom user profile fields to allow our users adding more software skills in their profile page. The problem I'm facing is it always saving only one meta for "skills" ...
0
votes
0answers
16 views

adding custom fields in wordpress default comment form

I have a hotel wordpress website i want user add there review and rating i used default comment functionality in my page but am stuck on how to add a select dropdown field and a rating field in rating ...
0
votes
1answer
20 views

Cannot save underscore custom fields in one wordpress installation using xmlrpc and underscores

I have a local installation of wordpress for testing and a production server. I use XMLRPC to create custom posts with custom fields and everything works flawlessly on my local installation BUT it ...
2
votes
0answers
72 views

Transition from (classical) serialized custom meta field to (gutenberg) rest enabled meta

I have a custom meta box for saving values from two input fields into a single post meta field. The data is saved serialized in the DB: get_post_meta( $post->ID, '_custom_key', true ) will ...
0
votes
1answer
49 views

Meta_query is not working on Elementor Custom Query Filter [closed]

I’m following this tutorial to create a custom query filter. I would like to filter by a metadata created by ACF (Advanced Custom Field), but it seems not working for me. My code is like this: ...
0
votes
0answers
26 views

How to import bluk data in custom taxonomy?

I have created a custom taxonomy. I had successfully added custom fields on that taxonomy using custom code in function as well as using ACF plugin. Now, I can create a new record, edit, update, ...
0
votes
1answer
20 views

How to create a custom post type with additional fields?

Beginner's question: Looking for example how to create a custom post type with additional elements. What I mean is: in my code I have a basic stuff like 'title', 'editor' ... but I need also for ...