Questions tagged [custom-field]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

How to execute a shortcode within a custom field?

I am using a plugin that generates a shortcode to display files from a Dropbox folder. I need to display the shortcode on a specific page, but it will be different for each user. Therefore I have ...
  • 1
1 vote
0 answers
18 views

Saving multiple custom meta box fields

So, I have a custom metabox, with multiple fields on it, and the amount of boxes is variable (could be 3, could be a lot more, depending on order quantity number) I'm trying to write a save function ...
0 votes
0 answers
11 views

How to show to show post list under the specific category name using jetengine query?

Is there anyone who help me to create a query in jetengine wordpress plugin. This will show the list of posts title and image under the specific category name to which it belongs. The category title i ...
0 votes
0 answers
12 views

acf_form() - "On Update" action [closed]

So, I have a repeater field which my site users will be able to use on the frontend using acf_form() to add rows to the repeater. This form appears on a WooCommerce order details page ACF Form works ...
0 votes
1 answer
23 views

Wordpress does not show the custom fields box

I have created a new CPT in my wordpress locally at the moment, I need it to have custom fields and I have added it so that it does. the code: register_post_type( 'centro_de_recursos', array( ...
  • 3
0 votes
0 answers
8 views

save all acf options in one meta_value [closed]

I have 5 meta values for each WordPress post and I'm using ACF for creating meta fields. I want to have just 1 meta value stored in DB instead of 5. I know it should be serialized but I don't know how ...
0 votes
1 answer
14 views

Update Custom Field daily within 7days

Is it possible to update the custom field daily within 7days? For Example: When a user created a new post, inside the post there's a Custom field name Points Earned. I would like to updated the Points ...
  • 13
0 votes
0 answers
13 views

Conditional display based on ACF checkbox

I have an ACF checkbox sub field in a group field on an options page. It has 4 options, and is set to return “Value”. I am trying to make a series of radio buttons that correspond to these options in ...
  • 29
0 votes
0 answers
8 views

One WP website as content source for several others

Trying to think of a solution for such request: One WP website used as a main content source for multiple others. This website is not a "real" one, it is used as an improvised content ...
1 vote
0 answers
11 views

How do you create a front end form that enables the editing of member-specific custom fields in WordPress?

I would greatly appreciate any help you can provide regarding the creation of a front end form to allow members to edit custom posts that I have created in their admin panel. I have successfully ...
1 vote
0 answers
11 views

How to add an ACF only for parent term?

the question here is not for the front-end, it is for the back-end. Is there any way that I can add a custom field using ACF that only displays/shows in parent term. └── Category ├── Motherboard &...
0 votes
0 answers
15 views

How to add new Metadata options (Date, Author, etc.) for Posts?

I would like to know if it's possible and how to create new Metadata options (like Date, Author, etc.) to show about a Post. I tried using Advanced Custom Fields, but I can't seem to use the custom ...
0 votes
2 answers
30 views

I want to show image from custom field image on my custom page template

I have created a taxonomy and in that taxonomy i have created custom field for image. Now I want to show that custom field image on my custom page template with category name. I have tried much it is ...
0 votes
0 answers
26 views

WP Query Args - search by meta_key or title

How do I filter to get records with titles OR content OR meta keys which contain a part of a string. If I set meta_values, $args = array( 'post_type' => KBE_POST_TYPE, 'posts_per_page' ...
  • 13
-1 votes
1 answer
21 views

custom field value is blank or empty

function add_custom_fields($post_id) { global $post; $metadescription = wp_trim_words( get_the_content(), 55 ); add_post_meta( $post_id, 'meta_description', $metadescription, true ); } ...
  • 1
0 votes
0 answers
14 views

acf field repeater link don't work

I am trying to make an acf repeater field with the link field. I don't understand why I get an error message: "Warning: ltrim() expects parameter 1 to be string, array given in" Here is my ...
  • 13
0 votes
0 answers
24 views

Can running a WP-Cron to update_post_meta cause performance issues?

I'm counting post views on a custom field inside wp_postmeta, the update happens each time a user interacts with the post. I was reading at this response Will a large postmeta table slow a site down? ...
0 votes
0 answers
9 views

How can I change the location where the custom field is displayed in the Quick Edit tab in WordPress

That's my situation right now: I want to display my "Artist" custom field under the "Slug" field, with the same HTML structure. But how? Example: The following code may help: // ...
  • 1
0 votes
0 answers
14 views

How do I organize posts based on their taxonomy?

I have a huge assortment of posts. They each belong to a taxonomy (let's say Taxonomy 1, Taxonomy 2, Taxonomy 3, and Taxonomy 4). On the page where they are displayed - I wanted them to be displayed ...
  • 1
0 votes
1 answer
74 views

Convert custom field date format to "Wordpress default"

Hello ladies and gents, I'm using F j, Y (e.g. December 28, 2022) as default date format on my site (set in the admin settings). I have an event custom post type with an event_start_date custom field. ...
  • 17
0 votes
1 answer
32 views

Change Post status based on custom field date +1 day

I have a working script to "expire" a post based on the data of a custom field. The post "expires" (status changes to a custom status archived) on the same day as the ...
  • 17
0 votes
1 answer
45 views

Add CSS class to posts with certain meta key

I am working on my header navigation and I want to underline the menu item for certain conditions. I would like to add a CSS class if the post has the ID 21638, or the post has the meta value 'bloom' ...
0 votes
0 answers
20 views

Sort CPT by taxonomy AND THEN by custom field

I am trying to sort a CPT first by Taxonomy (tag) ASC and then by custom field (last_updated_hc) DESC which is a date-picker field. Using posts_orderby I can sort by taxonomy but I am running into ...
0 votes
0 answers
16 views

WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?

I am having some trouble figuring out the logic of this query and what I need to do to make it work. I created an "Event" custom post type, and every Event post has a date value coming from ...
  • 1
0 votes
1 answer
18 views

Set new url from custom post field

I've create a new custom post type "Event". I've added a custom field (Post Object) to the post type "Post" were you can select the corresponding Event. So I create post new post ...
  • 135
-1 votes
1 answer
13 views

Post object GUID adding http:/

In my template I have href="'.$package_link->guid.'" The resulting HTML is: href="http:/package/download-2023-friday-arrival-monday-departure-weekend-coach-festival-ticket/" Why ...
  • 141
-1 votes
1 answer
23 views

Is there a way to read JSON data inside Custom Fields without editing PHP? [closed]

I have a post with Custom Field called json_data, inside there is an array of strings such as: {"data":["string no 1","string no 2","string no 3"]}. Is there a ...
  • 101
0 votes
1 answer
80 views

Displaying custom meta box value in a custom post page

I have an issue with custom meta boxes in a custom made plugin. In fact, the task is simple, but I am new in this field. I made a plugin that allows user to enter the movie title in a custom meta box. ...
0 votes
1 answer
19 views

How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?

I have a CPT with daily deals, I need to show these daily deals on my frontend as per today's day. For eg, if it is Thursday : The returning array should return Thursday, Friday, Saturday, Sunday, ...
0 votes
0 answers
19 views

Can I log the searches that are returning 404 in the DB?

I would like to log every single search query for which one gets 404. For example, if I search Cat in the search box, but my website doesn't have any content as cats. I would like to log that "...
0 votes
0 answers
15 views

WP_Query – order with usort by custom meta

I have a custom post type location which has different categories (e.g. museums, theatres, shopping) and I want to output each of these categories and order within these categories by distance which ...
  • 1
0 votes
0 answers
27 views

Insert a custom field as a second email address to a completed order in WooCommerce

I'm looking to use a custom field from "Checkout Field Editor for WooCommerce" to use as a second email address to a completed order in WooCommerce. I started by using this code which works ...
  • 1
-1 votes
1 answer
26 views

Is there a plugin or another way that can help me find out the underlying files of a page/post? [closed]

I have a WordPress website, developed by someone else. I need to make some changes and fix some issues, as the site still has some flaws. For example, there are some fields that need to be changed, ...
0 votes
1 answer
61 views

querying to custom field over ACF REST API

Iam using the "ACF" plugin with "ACF to REST API". I found a solution for querying a custom field over REST API. I inserted this into my functions.php: add_filter( 'rest_{type}...
  • 101
0 votes
1 answer
68 views

Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?

I am working on an online magazine in WordPress PHP (with Advanced Custom Fields plugin). I specify the date of the article's publication with 'date picker' field. Even though for articles ...
0 votes
1 answer
33 views

Render CMB2 select option to post page [closed]

I'm using CMB2 plugin to add select metaboxes into a post. The metabox work fine on the post editor. But failed to render and displaying on post page. The code for post editor add_action( '...
1 vote
0 answers
27 views

Create Unique and Customized User ID for Website Members in WordPress

I want a Feature which can allow Custom User ID creation at Registration on WordPress. This will be different from the User ID that WordPress creates at Registration. This one is something that is ...
0 votes
1 answer
46 views

Custom Fields after update to WordPress 6

I had a site where posts had custom fields and upgraded to WordPress 6 recently. However, now I cannot find the custom fields in the back-end. They still display correctly in the front-end, so the ...
0 votes
0 answers
24 views

Custom fields: Split data from single custom field's sub-array to separate custom fields when saving post

TLDR; I’m using a plugin that stores its custom field data in a sub-array, and I would like to save parts of the data from the sub-array to separate custom fields when a post gets saved. In my case, ...
  • 310
0 votes
0 answers
47 views

Send email on creation of custom post type and use get_post_meta()

I've setup a custom post type and I want to send an email when I publish a post but I want to use some data from the custom fields I've added to that custom post type, including obtaining an email ...
  • 1
0 votes
0 answers
13 views

Grabbing value of input field inside of array

I recently made customized input fields. I was able to grab the values normally with woocommerce_form_field, specifically with the get_value attribute. I want to grab the value of each inputted field ...
0 votes
0 answers
17 views

How can I copy value from dropdown once I select it to text area as text?

How do I copy the value of the department from the dropdown to the text area once I select it? For example if I select IT department I want it to appear in comment text area like "IT Department:&...
0 votes
0 answers
10 views

Dynamically update Custom Fields to display new dates

we are creating a registration page for Zoom meetings, where I just send the details filled in the form to Zoom using a webhook. We want to give the registrants 3 different dates (always on Saturdays ...
0 votes
0 answers
21 views

How do I create a term for every value of a post meta?

I have some information stored in post meta that I'd like to convert to terms. I'd like to create a term in a custom taxonomy for every meta value with a particular key. I need to loop through ALL ...
0 votes
0 answers
13 views

Site uses wpdb to fetch meta_keys but just displays first meta_key from a page (the post uses the same meta_key "filmmaker" more than once)

My page should display all filmmakers, that have been tagged as "filmmaker" in my posts. I do have posts that feature more than one filmmaker (meta_key = filmmaker) in custom fields, but ...
0 votes
1 answer
33 views

How to get all specific fields from one ACF Group?

I have created few question/ answers using ACF. Field names are question_1, question_2 and so on. My codes are: <?php if (get_field('question_1') == 'yes') && (get_field('question_2') == '...
  • 49
0 votes
1 answer
32 views

How to detect if an ACF custom-field is really in use?

I want to find out if a custom-field is in use for a post or term. That means the custom-field has a content and is not empty. I guess that's more difficult for selects, radio or checkbox-inputs. So ...
1 vote
0 answers
16 views

WP query with variables gives no result for specific user

I'm trying to fetch one custom post with two values: the logged in user ID and a known string, both as variables. The query works out fine when testing on an admin account where the user ID is 1 and ...
0 votes
0 answers
19 views

Function to Compare CPT Post Custom Value with Default Posts CF Value

I want to create function for compare custom field values of CPT Posts with default posts CF Value. As of now I implemented below code in template file which is working fine, but I want to create ...
0 votes
0 answers
16 views

Save And Display Mp3 Audio files on WooCommerce product page with Dokan

so basically I use dokan as my multivendor shop and I want to give sellers the option to add an MP3 Demo of their product that will display on product page. https://wedevs.com/blog/409723/how-to-add-...
  • 1

1
2 3 4 5
74