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
0 answers
7 views

UNABLE TO SAVE WORDPRESS PAGE AFTER EDITING [closed]

Im uable to save the page after pressing the update button in elementor edit and ive added 11k lines of custom code to the page using elementor text editor. it doesnt give me an error.
user242204's user avatar
0 votes
0 answers
33 views

How to conditionally change template based on ACF field in WordPress 6.5 with FSE theme?

I'm currently working with WordPress 6.5 and using a Full Site Editor (FSE) theme. I need to dynamically change the template of a page based on the value of an Advanced Custom Fields (ACF) custom ...
Caribou's user avatar
0 votes
1 answer
6 views

Custom fields empty after refreshing page

I have added some custom fields to the Gutenberg editor, the purpose is getting these custom fields loaded in the custom-post-type. Thats is all working, I was able to get the custom-fields in the ...
Brango's user avatar
  • 1
0 votes
0 answers
18 views

Problem with custom user fields default value and retrieval

I created 2 custom fields for users on my site, a Company name and a checkbox for whether a user has download access or not. Here is the snippet for the functionality: add_action( 'edit_user_profile', ...
Miroslav Kazimirovic's user avatar
0 votes
2 answers
13 views

how to compare date meta value in jet smart filter Date query?

trying to compare meta value between today and next 7 days, tried this in value field %today%, %str_to_time|+ 1 week% but its not working.
vikram's user avatar
  • 1
0 votes
0 answers
17 views

Cannot Access ACF Field Values via my Plugin

Objective I am working on a WordPress site built using Timber/Twig. I have a plugin (built using standard PHP and saved in the standard plugins folder) that is supposed to grab ACF values from a ...
Isaac Hillaker's user avatar
1 vote
0 answers
24 views

Only allow users (that are not admins) to edit a specific post

I am using a ACF field on the user profile.php to assign a post id to a user. The users need to be able to receive the capability to edit this post, but only this post. They should not be allowed to ...
Klein's user avatar
  • 11
0 votes
0 answers
9 views

Issue using form in Google app in mobile

I have a contact form on my website, and I'm utilizing Contact Form 7 (CF7) plugin for it. However, when I fill out the form using the Google app on my mobile device, the page seems to reload somehow. ...
Baim Quraisy's user avatar
0 votes
0 answers
7 views

I have design Tab in a Bootstrap 5 in row. And repeat row in ACF. only 1st row tab data is show. other row data off tabcontent appearing display:none

" alt="Therapists Image" class="img-fluid" width="450" height="675" loading="lazy"> <div class="...
Santosh Kumar Patel's user avatar
0 votes
0 answers
10 views

custom post type with metabox custom fields

how to make meta custom fields in custom post type name jobs_board_cpt , I am using boilerplate ? public function jobs_board_cpt() { $labels = array( 'name' => ...
Muhammad Ashfaq's user avatar
1 vote
0 answers
6 views

Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages

I'm encountering a problem with a WordPress plugin I'm developing for DirectoryPress listing pages. The plugin aims to replace the default permalink with a new link specified by users in a custom ...
Xplosio's user avatar
  • 11
0 votes
0 answers
9 views

Populate Elementor Form based on first selection

for better understanding, check this elementor tutorial https://youtu.be/wYv0tMFDFG0?si=cg2nQE6a5zl0FdHp&t=610 starting with 10:10 min, is what I need. Instead of Options 1, 2, 3, etc, I have ...
Vali Dragomir's user avatar
0 votes
1 answer
23 views

Best Practice for storing aggregate data by date or other criteria?

I'm creating summary descriptions by year. To do this I do update_post_meta on save to set values for word count, image count, external link count. So for a year archive page I iterate over each post ...
artlung's user avatar
  • 3,087
1 vote
2 answers
25 views

add_post_meta unique value for all custom posts

I have a custom post type "Propietario" with several custom fields, and 3 of them: "dni", "email" and "phone" I need unique for all Propietario Post types. This ...
JJMontalban's user avatar
0 votes
0 answers
20 views

wordpress-plugin (widget) that performs a Neaby-search on the openstreetmap-endpoint: around x find y

i am about to create a wordpress-plugin that offers the output of the following data ... the data of a a Neaby-search: can we create a quewry that shows up all the schools that are in the near - in ...
zero's user avatar
  • 170
0 votes
0 answers
17 views

How to create advanced custom fields for backend content

Is there a straightforward way to create custom fields for module-based content on WordPress? Example: User Creates page Creates Page content sections through forms Row 1: Column 1 - Content A ...
Jeremy Thomas's user avatar
0 votes
0 answers
13 views

Add File field in WooCommerce Box office plugin

I'm using WooCommerce Box Office plugin and I want to customize this plugin according to my requirements for example I want to add another field option called 'file' so user can upload files as well ...
M Sufyan Shaikh's user avatar
0 votes
0 answers
19 views

Woocommerce send metadata to stripe

I am using woocommerce checkout and woocommerce stripe payment plugin, I want to send metadata to stripe from woocommerce order the [billing_vat_number] Can anyone tell me how its done, it is much ...
David's user avatar
  • 1
0 votes
1 answer
20 views

Custom Field in Page Title

I need to show a custom Field in a title (CPT) I have this code function wpse_224340_document_title($title){ global $post; // make sure the post object is available to us if(is_singular('mec-...
Laurapnunez's user avatar
0 votes
2 answers
213 views

How to display WordPress Twenty Twenty-Four's built-in custom field in a post (or page)?

WordPress's Twenty Twenty-Four theme makes it possible to add custom fields directly in the editor, but I simply cannot figure out how to display such fields within a post or page (without a plugin). ...
YCode's user avatar
  • 125
0 votes
1 answer
25 views

How to create alias / synonym links to existing posts

I have a directory type website, where each post is a word definition. I want to set up synonyms of these words for audiences from different geographies. For example, let’s say I have a post for “...
Rhecil Codes's user avatar
0 votes
0 answers
23 views

How to filter posts with a wp query by a custom dropdown type field with the magic fields plugin

I have been trying to obtain posts by filtering by two custom fields in a wp query, the problem is that I do not get the expected result, which is that I filter by country and by a value that I am ...
Peter Alexander's user avatar
0 votes
1 answer
86 views

get_field for a widget value returns null ACF

I am using `ACF` plugin to add a custom field to my widgets. After creating the field with the name `mobile_enable`, tried to get the value with the method explained in the ACF docs which is the ...
MeMo's user avatar
  • 61
-1 votes
1 answer
45 views

ACF auto complete all value from 1 cpt to another cpt

I want to fill all values in CPT 2 automatically if field names match between CPT 2 and CPT 1. In cases where, for instance, CPT 2 field 1 doesn't match CPT 1 field 1, manual input for all fields in ...
Tuagapat Manam's user avatar
0 votes
0 answers
19 views

Need some suggestions with Relationship fields and CPT/ACF

I am tasked with creating a Student/Teacher Portal where among other things, I need a way to build a way for Admins to assign Teacher with Students based upon Subject and Age group (Age for students). ...
RitZz's user avatar
  • 1
0 votes
1 answer
22 views

Custom post type needs to capability to create and edit by some specific user role

I made a custom post type called "Jobs" by ACF. I am using "Members" plugin to give users role. I want some users will get the capability to create post and edit post. others ...
arif hossain's user avatar
0 votes
2 answers
43 views

How to get products with the same custom attribute like ean code

I Try to get all products with the same ean code, but the query doesn't work and also doesn't give any errors. What am I missing? Here is the code I use. if (is_product()) { global $product; $...
apero's user avatar
  • 101
1 vote
1 answer
28 views

Get featured image thumbnail and inserting into custom field on wordpress posts

I'm not a developer so trying to put this together has not been successful. Hope someone can assist! My goal - create a custom field on a wordpress post when a post is published or updated which ...
StevieK's user avatar
  • 11
0 votes
0 answers
26 views

Need to add custom cart item data

I need to create custom elementor product carousel. From that carousel there is a date field. User can select date and add product into cart. The selected date will be displayed as 'preferred date' ...
Khalid Saiffullah's user avatar
1 vote
0 answers
16 views

edit index custom post type page with elementor or other

i have a custom post type in wordpress like book. i can edit single pages template with add single-book.php file and edit archive pages template with archive-book.php file. i know main page of this ...
milad taghizade's user avatar
0 votes
0 answers
46 views

Skip un-set meta fields ("Invalid field: fieldname") when using `wp post list` and displaying custom fields

We have custom fields called country and coordinator. This works: $ wp post list \ --post__in=81153 \ --post_type=boardmember \ --fields=ID,post_title,post_name,post_date,post_status,country,...
3wordchant's user avatar
0 votes
1 answer
69 views

Can I count every article following extracted meta value?

I can show all value in certain meta key(species1 and species2) by my code below. It shows like this. $species[]contains many kinds of bird species. Crow Eagle Crane Pigeon... Now, I like to count ...
cwhiro's user avatar
  • 25
0 votes
0 answers
12 views

Adding amount to cart when input field is filled

I am trying to add a custom input field to a single product template in WooCommerce, which would add a fee of $20 to the cart total if the customer inputs data in the field. I have added a custom ...
PatInParis's user avatar
0 votes
0 answers
20 views

SQL query based on two different custom field values

I have custom post type "store" that has two different custom fields: Coutry and City. When in the single country page I list all the stores in that country. What I would like to do is to ...
chaq's user avatar
  • 1
0 votes
0 answers
43 views

ACF block gutenberg aligncenter don't work

I'm starting with creating Gutenberg blocks with ACF. I would like to create a simple button, so far so good. My problem comes from the center alignment. When I align my element to the left and right ...
Thica's user avatar
  • 17
0 votes
0 answers
56 views

Conditionally get ACF field in Wordpress nav walker based on parent menu item?

I am building out a mega menu for a site and I have some ACF fields set up that I want to display in each of the sub-menus in the navigation. I want to specify which field to used based on which ...
user13286's user avatar
  • 255
0 votes
0 answers
25 views

How to pull through page title depending on which radio button is selected on the specific page?

I'm pretty new to Wordpress, ACF and PHP. I am currently working on a project, the website has 11 different sports centres all with different sport/activities, on each centre they will have a sidebar ...
jonnyplat's user avatar
0 votes
1 answer
245 views

Can't expose custom field to REST API

As far as I can tell, the following code should make the video custom field of my CPT project available through REST API. Yet the custom field is still not exposed. Why not? add_action('rest_api_init',...
drake035's user avatar
  • 1,167
0 votes
1 answer
46 views

Adding the numerical values from a custom field from all posts in a category

I have a blog that is documenting an airplane build process. Posts describe the work done each day, and are organized into a category for each component. Each post has a custom field for hours logged ...
John's user avatar
  • 103
2 votes
1 answer
205 views

Block Editor - Meta values not saved, meta changes to empty array on update

Issue TL;DR I have a block that updates meta values, but when I click 'update', the values are not saved for the post. Additionally, the meta values I get from useEntityProp load as an object with ...
Baerkins's user avatar
  • 163
0 votes
0 answers
228 views

warning: trying to access array offset on value of type bool ACF field image group

I have a problem with an acf function for displaying an image by array. I can get my image to work well when I upload it to the field associated with it. On the other hand, when I don't put an image, ...
Thica's user avatar
  • 17
0 votes
2 answers
44 views

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field. I have an ACF User field (allowed_users)that author's can multiple select when they ...
Pete's user avatar
  • 998
0 votes
0 answers
13 views

Category display using conditions

I have a custom post type(events) created and has taxonomy(event-categories) with parent and child categories. Since im not good in coding, i will try to understand all the help from here. So what im ...
Bordzee's user avatar
0 votes
1 answer
40 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
-1 votes
1 answer
28 views

Custom rest fields not loaded in rest api cpt response

I have a custom endpoint that will be used from my vue app to load custom post type I've registered using a custom plugin. I need to add some custom fields to the response when the posts are loaded ...
ICTDEV's user avatar
  • 123
0 votes
1 answer
202 views

Display WooCommerce Order Custom Field In Template (HPOS)

Until now, I used this code to display a order custom field value inside a template: <?php echo esc_html( get_post_meta( $order->get_id(), 'my_custom_field', true ) ); ?> When enabling HPOS ...
Daniel's user avatar
  • 1
0 votes
0 answers
45 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118
0 votes
1 answer
20 views

Query custom fields with three dates - start and end does not work

I have tried to make a reservation system for a book a table in restaurant. But, I have a problem when I try to see/ make new reservations in an specific day - in showing me which table are free at ...
Fujitsu09's user avatar
0 votes
1 answer
22 views

Sort wp_query of two post types using meta datefield for one and date for the other - possible?

I have two queries that result in id-arrays that I merge into a common array which, in turn, has all the posts I need from the two post types (posts, events). However, in the sorted list I would like ...
yms's user avatar
  • 35
0 votes
0 answers
10 views

update and sanitize a value of a select field

I'm trying to update and sanitize the value of a select field, this custom field is in user-edit-php I,m using this code update_user_meta( $user_id, 'saldo', sanitize_text_field( $_POST['saldo'] ) ); ...
Andrea Sacconi's user avatar

1
2 3 4 5
75