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

I want to add a custom select field in a WooCommerce Checkout - and based on the selection, open new text fields to be added

add_action('woocommerce_before_order_notes', 'wps_add_select_checkout_field'); function wps_add_select_checkout_field( $checkout ) { echo '<h3>'.__('Delegates').'</h3>'; ...
0
votes
0answers
5 views

Query post by custom field repeater date

I want to use $last_date as the value, but the problem is that its not a custom field itself, but the last row of a repeater field. I have the following statement inside the loop: $event_date = ...
0
votes
0answers
7 views

Wordpress one Site, Same Login but Direct to different group pages or post

Not sure if the right place or not, so I'm not sure if I need to write code or plugin provided it I'm looking for user and permission in Group something like this website has the same login for all ...
0
votes
1answer
20 views

Custome fields not displayed

I am unable to see the custom fields I have added in the website. I have done the following: I have installed Custom Post Type and Advanced Custom Fields plugins. Using them I created a custom post ...
0
votes
0answers
7 views

Display 1 custom post type by a custom taxonomy not working

So the idea here is I have multiple products (CPT) and a custom taxonomy named Feature. It's a radio button field with Yes/No option. I want to display 1 random featured product on front page. But ...
0
votes
0answers
20 views

Is the use of many custom field not good for server?

Using many custom fields is really bad for the server, so you should avoid it as much as possible. It was written in this forum. I'm wondering whether to receive the information entered by the user in ...
0
votes
0answers
20 views

JetEngine: Repeater field shortcode? [closed]

Is there any shortcode to display a repeater group and its fields? By using Shortcode generator, if I want to show single field, I can use: [jet_engine component="meta_field" field="...
0
votes
0answers
20 views

Updating a custom post status after an expiry date rather than trashing it

I have set up a custom post type of featured products. Within that post type I have a custom date field for an expiry date. Currently when the date expires, the post gets moved to the Trash. I'm ...
0
votes
0answers
13 views

How to make two different meta fields look for same thing

I am new to WordPress and working on an events management website. I am using a theme that looks for events data using some specific meta fields for e.g. event_start_date for start date of the event. ...
0
votes
0answers
10 views

How to fill custom field with category ID

I am looking for a way to automatically fill a custom field with category ID (or with name). Value of custom field should update whenever I change the category of post (or when I save post). Thanks ...
0
votes
0answers
28 views

Display Custom Field Value Via Shortcode Inside Excerpt

I have the following function: function dessert_function( $atts ) { $atts = shortcode_atts( array( 'post_id' => get_queried_object_id(), ), $atts, 'dessert' ); return ...
0
votes
0answers
9 views

How to make a front end fields from metabox

I want to clarify that I am not a specialist, my query is how to insert a metabox in the front end, specifically I show you the image: I want to do this: But actually I have this: Those are the php ...
0
votes
0answers
35 views

Display a category custom field on a single page [closed]

Display a category custom field on a single page Hello, I made a custom field with ACF to add a text field (name 'artistemail') for each categories. Now I want to display this field on a single page (...
0
votes
0answers
10 views

Custom script/iframe after “Add to Cart” in WooCommerce for every product

I need to add a custom script/iframe for each product on a WordPress/WooCommerce site. I want it to show after the "Add to cart" button. I know I can use WooCommerce Hooks to perform this ...
0
votes
0answers
15 views

add datepicker to post edtor

I've created a wordpress headless installation that rely on vuejs and REST api for the front-end. I need to add into the classic editor a datepicker to give the user the ability to select a date that ...
1
vote
1answer
17 views

Querying Two Custom Post Types with OR Not Working

I'm trying to query two custom post types - I want all research_article to return, but only events that are in the future. My events are working as expected, but I'm not getting any research_article ...
0
votes
0answers
13 views

WP Plugin for product RFQ (with both listed and unlisted product ability)

I'm upgrading my old WP website from having static product attribute/variants tables and a basic contact form (which has served me well last 5 years), to a more interactive RFQ (Request For Quote) ...
0
votes
0answers
8 views

Creation of a search page and event display with datepicker metaboxes

Being a beginner in the development of Wordpress theme, I'm currently trying to create a custom search filter on a dedicated event search page template. For this, I created custom fields of date ...
1
vote
0answers
24 views

Limit the number of acf content when displaying in post loop [closed]

I display post images by this way in the loop . <?php $images = get_field('POST-IMAGES'); $size = 'medium'; // (thumbnail, medium, large, full or custom size) if( $images ): ?> <ul> ...
0
votes
2answers
37 views

Shortcode To Display Post Custom Field Value in Post Title, Post Content

I want to create a shortcode that pulls value from a custom field of a post and parses that value on Post title, post content. So if the custom field value is Icecream for Post 1. On the admin side ...
0
votes
0answers
13 views

How to show title and meta-data from one page to another dynamically?

I have been working on a project where it requires me to show custom-post custom-fields and title to show on checkout page as I click on 'make an order' button on single-product.php. Basically, I am ...
0
votes
0answers
25 views

WP_Query get always custom post_type for first

This is my problem. In a WP_Query I want to get always a content of particular post_type like first occurance in a list of five. This is the code I use: $args = [ 'post_type' => ...
1
vote
1answer
10 views

How can I get the number of custom post type posts that have a specific attachment image set?

I'm currently using this to filter out only posts that have a specific custom image attachment field value. But it's returning 0. I used this method for other custom fields and it worked great. Is ...
1
vote
1answer
22 views

Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)

I mean; There are more than 7000 posts. some have private space but some do not. I want to add a custom field in bulk to those that do not contain custom fields and update their values. The following ...
1
vote
1answer
17 views

Update posts after populating ACF field value

I'm running a function to populate some custom fields with some values specified: add_filter('acf/load_field/name=event_end_time', function($endField) { $endDate = get_field('event_end_date'); ...
0
votes
1answer
22 views

Move the post title to another field

i added a new field (property_second) to the admin area of the theme. and i want this field value to be the same as the post title. so if the post title changes, let it change here. how can I do it? ...
0
votes
0answers
12 views

Change billing fullname with a custom field in Woocommerce emails

I using Checkout Field Editor for WooCommerce to make 25 custom field. I have problem billing_fullname not show in customer details but show in billing address. So i have thinking about a solution ...
1
vote
0answers
12 views

Trash / Draft a WordPress custom post after custom date field expires

I have seen some examples of people asking similar to this but no real solution. Hopefully someone maybe able to point me in the right direction I have a Custom Post Type set up called ...
1
vote
0answers
10 views

Set a maxlength for the title input in a custom post type

I'm creating a new custom post type. But I need to limit the max length for the title. This is how I'm creating the field in my code: array( 'key' => 'title', 'label' => 'Title', '...
0
votes
0answers
10 views

How can I add an input to an Order Item on the Checkout page?

I want to add an input text for every Order Item so the user can set some information for that Order Item on the Checkout page. I just found articles about adding input text to the product page and ...
0
votes
0answers
13 views

ACF update_field is not getting saved after wp_insert_post

I have the following loop where I insert new custom post types in db and after I try directly to add some ACF field values which they are never getting saved. What is wrong in this case with the code ...
0
votes
0answers
12 views

Posting to a Custom Post Type from front end - user generated content

Is there a fast and reliable way of posting to a Custom Post type from the front end? My use case is for creating a daily checkin for a fitness trainer. I have created the necessary fields using ACF. ...
0
votes
2answers
42 views

How to save multiple values with same meta_key, each value linked to another tag id

Let´s say a user signs up to multiple memberships, each on a different date. User signs up to: Membership A on 05.03.2021 Membership B on 17.05.2021 Membership C on 29.07.2021 I would like the dates ...
0
votes
1answer
16 views

Move the metaboxes to the very top of post editor

I have this function that creates a custom metabox (with the metabox .io plugin), i would like the metabox to stay on top just below the title field this is the code i am using function generator_api()...
0
votes
0answers
15 views

trying to link between 2 metabox

hello i'm using cmb2 to create metabox so i created a repeatable group contain to fields $cmb_repeat_test->add_group_field( $group_repeat_test, array( 'name' => esc_html__( '...
0
votes
0answers
13 views

What is the ideal way to make modifications to an external plugin?

I'm using an LMS plugin known as Tutor LMS and there are certain modifications that I would like to do to the plugin. The way that I thought of originally was quite cumbersome. It involves creating a ...
0
votes
0answers
15 views

Read / Watch / Listen times - meta

I have a website organised around three kinds of posts (categorised accordingly): "Read" "Watch" and "Listen". I want to have a read-time and watch-time and listen-time ...
0
votes
0answers
20 views

Moving a meta field value in a taxonomy

A meta field was created, but it is not so convenient to use it, so a taxonomy was created, now for each entry need to transfer the values from the meta field to the taxonomy field, did this function ...
0
votes
1answer
36 views

Shortcode for Custom Field of Media Attachment (to use with Featured Images)

I'm using ACF (Advance Custom Fields) for Media Uploads to store location information about photos. When I set a post Featured Image to a photo that has this extra field, I'd like to output the ...
0
votes
0answers
10 views

How to use Wordpress with different content types vs taxonomies and upload the data by CSV so it all relates

Wondering if anyone can help, I’m using Wordpress and Beaver Builder to make a site which is bases on comparing hospitals and their treatments. So I have about 60 hospitals and about 1800 treatments. ...
0
votes
0answers
19 views

Replacing date values in TIMESTAMPDIFF() with custom fields from wp_postmeta

Two days ago I opened a thread related to the command 'timestampdiff()' -> Old thread). I think I've described the problem a litte bit too complicated, so I will describe it easier in this new ...
0
votes
1answer
17 views

Simple custom attributes on posts

I'm working on a site which will have a dozen of menus. There will be a subnavigation widget below the header. My client wants his content writers to be able to select which menu would show up in the ...
0
votes
0answers
14 views

How can I rename a custom field group?

I want to rename the "password managers".
0
votes
0answers
26 views

$wpdb: using timestampdiff with custom fields

friends, sorry for my bad english. I hope, that someone could help me with my problem :-) I'm about to relaunch my website, which serves data of thousands of famous people. In the past i retrieved the ...
1
vote
1answer
35 views

Display custom fields from custom posts in RSS feed

I've been struggling with this for a few days and still can't figure it how. What I am trying to do is to add a custom table field into the RSS feed, so I am using Code Snippets for this matter. Below ...
0
votes
1answer
19 views

Hide a div if the fiels is empty

I have a problem to hide a div when the input of a custom field is empty. This is the code I am using, it's fine when the field is not empty. But when the fireld empty, the div will show. The field ...
0
votes
0answers
11 views

Bulk Update Custom Fields for Custom Post Types

I am using this function which works great in case anyone wants to bulk update custom fields for custom post types (just change parameters as necessary). $args=array( 'posts_per_page' => -1, '...
0
votes
0answers
6 views

Problem how customers will find events happening in their own city and not all the events happening in the whole country

We have several events around a country and we would like to have some kind of filter or something that people dont need to go through events happening thousand kilometers away. How can we do this? ...
0
votes
1answer
42 views

ACF multi taxonomy on filterable gallery

I created a filterable gallery with ACF. My problem is that when I add a project to which I add several taxonomies, in my gallery I have the project as many times as I have added taxonomies. Apart ...
0
votes
0answers
15 views

How to use the Term Object from a custom select field in a query

I have a WordPress site in which I want to show 2 recent posts from a specific category. I want to use custom fields (via ACF in this case) to allow the site admin to choose/change the category ...

1
2 3 4 5
72