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

learn more… | top users | synonyms (2)

0
votes
0answers
9 views

Query posts by switch

I need your help to add a case to a switch in my theme to order posts. My theme uses a query_post: query_posts( $query_string . $orderby ); In the loop to order generated posts. The query uses ...
0
votes
0answers
11 views

Can't save meta field value if the title not set

I'm using the example from WordPress Codex (https://codex.wordpress.org/Function_Reference/add_meta_box#Procedural) to add and save meta box values. Unfortunately I can't save the value of the meta ...
0
votes
1answer
14 views

Types Plugin - Display options(select) in template

I have created a custom "select field" in admin panel using types plugin. Is it possible to get the values and use it somewhere outside the plugin(in theme or in another plugin)? I like to update the ...
0
votes
0answers
11 views

Create new table vs post_meta table database dilemma

I'm working on custom function that will store post data but I dont know which method to use. I have meta box in edit post area that will store diferent videos (embed code) for each post will have ...
0
votes
0answers
15 views

Create custom field on post from the content

Hello i want to add posts form cvs but i need a custom field for the items marked with red in the image please tell me how to do it
0
votes
1answer
17 views

Create custom query for search?

I have create search box using ajax.If i enter any value in search input box that this value search in post title or post meta data and get all data of this value in custom post type.also query check ...
0
votes
0answers
14 views

Change post template the proper way

I'm trying to create an option on edit posts screen (backend) to select different post template based the selection and I need your opinions guys if that is the proper way. Here is what I've tried so ...
0
votes
1answer
15 views

How to load script conditionally on custom field in wp_postmeta?

I'm trying to tidy up some of the code that has been doing its job for quite a while. Specifically, I used to load scripts in header.php and I'm trying to move that into functions.php. One of the ...
0
votes
0answers
9 views

Add Custom Fields to Tags

I have been searching how to add custom fields to taxonomies, but all what I found (that works) is how to add custom fields to category (below is my code), but I dont know how to edit it to add custom ...
1
vote
1answer
17 views

How can i make WP_Query return post image and categories?

I have a sidebar widget that will display related posts based on a custom meta field. The query works, but its very wasteful. All i need is the post title, featured image and the categories of the ...
0
votes
2answers
31 views

Get categories query not working in function.php

I am trying to get the categories of my custom post type in functions.php But it not return any value, when i run this query in any theme file it work fine. Here is my code function ...
0
votes
0answers
17 views

Adding keyword to meta key search

With the help of some users on Stack Exchange, I've built a custom faceted search which searches quite a large list of custom fields using drop down selectors. I'm having difficulty adding a keyword ...
0
votes
0answers
8 views

How To Add Custom Meta Field Select/Radio Box to Post List Bulk Edit Mode

How can you add a radio fieldset to a custom post-types post list bulk edit screen for a custom meta field? Please provide in depth code example and explanation and thanks in advance. The ...
0
votes
0answers
12 views

Order Custom Post Type by Custom Field - Genesis

I have created my own custom post type and taxonomies with Custom Post Type UI plugin. With Advanced Custom Fields plugin I create custom fields for my Custom Post Type. I'm using WP All Import to ...
0
votes
0answers
4 views

custom field suite : relationship filter by category

i'm working on a wordpress site where the Custom field suite plugin is already installed : http://customfieldsuite.com/ The plugin allow the admin to create a relationship field : ...
0
votes
1answer
21 views

get_field() in Advanced Custom Fields retrieves bool(false) [closed]

I have a background image, which has to be adjusted in every post. Therefore the ACF plugin. But whenever i try to query the custom field by get_field('bg-size',$post->ID) , ...
0
votes
1answer
10 views

Add Image With Changeable Link in Custom Field [closed]

In my WordPress site, I want A image with changeable link in bottom of every post. The Image will be fixed but links should be changeable. I want This changeable link option in the post editor of ...
0
votes
0answers
5 views

Wordpress - Pagination post, order by: meta_key only from current category

I trying to make a pagination links from my website. Schema: Serie | (category) |_ Temporada 1 (taxonomy: temporada) |_ Episodio 1 (posts 1 - meta_key: numeroepisodio) ...
0
votes
0answers
29 views

Update Custom Fields once post's modified

I have a particular custom post type, called person, and want to display them on a Faculty page. There is a particular order I would like these people displayed on the page, and don't want them ...
0
votes
0answers
16 views

How to order post by custom fields count

Situation: I have a custom post type with a Relational Field (I'm using ACF Pro) which links these posts to another custom post type. I use the first type to let the users upload their pictures of ...
0
votes
0answers
9 views

Best way to filter posts being displayed on the fly

I got the following post structure: The search box is to illustrate what I want to achieve. CPT Videos: Videos being displayed in the image. CPT Artistas: Another post type for the artists. ...
1
vote
2answers
109 views
+50

Plugin not saving values when placed in a folder within /wp-content/plugins

Ive got the following code for a WordPRess plugin that essentially add two custom inputs on each page/post edit screen. The values are then saved and output in the header of the frontend page. The ...
0
votes
1answer
25 views

Custom field, add class to anchor tag

I'm trying to add a class to an anchor tag within a custom field. Like: <div class="custom-field-class"><a href="http://someurl.com" class="some-class">Awesome</a></div> ...
0
votes
1answer
55 views

How to show posts rank based on custom field value

I have total 100 posts, 10 posts in each page on homepage with paginatin. Here is my code $args = [ 'posts_per_page' => 100, 'fields' => 'ids', // Add additional args here ]; ...
0
votes
0answers
16 views

Show content if deadline is passed

I am using Date Custom Field in a scholarships information website and using this code to get scholarship deadline. I just want to show two words "Applications closed" if the application date has been ...
2
votes
1answer
43 views

How do I set the default admin sort order for a custom post type to a custom column?

SOLUTION AVAILABLE HERE I've set up a custom post type called clientarea, and set up several custom columns for it in the admin area - the custom columns are all custom meta fields, as you can see ...
0
votes
1answer
13 views

How to enable the user to add value through the admin panel?

please help me! I have custom posts type 'gallery'. In my custom post type i have custom fields. I added them through the file functions.php. How to enable the user to add value through the admin ...
0
votes
0answers
6 views

Utilizing 'link format' in WordPress without losing SEO value?

In many WordPress themes that support formats, applying the link format to a post makes its title point to a URL (examples can be found: Daring Fireball and MacSparky). In the theme I'm using, the ...
0
votes
2answers
37 views

Display custom field value part by part?

I have custom field in posts called hex_colors which contains hex color codes separated with white space, custom field value is like this: "000000 f0f0f0 c0c0c0 202020 404040 " I can change ...
0
votes
0answers
53 views

Get month and day from a Date Picker custom field

I've got a custom field called fecha_del_evento from which I want to obtain the day and the month in different formats; day in numbers, and month with the 3 first letters. The code I'm using is a ...
1
vote
0answers
66 views

meta_value_num not ordering all items

I am using meta_value_num to output a list of items in order by a custom field. The custom field value that is being passed is 1, 2 ,3 or 4. The order works for the first 7 items but after that they ...
0
votes
0answers
19 views

hook wp_get_attachment_image_src

I am using wp pods custom fields for custom post types.. I am holding image links in custom fields. With a hook to "post_thumbnail_html" i fixed thumbnails but when i need wp_get_attachment_image_src ...
0
votes
0answers
12 views

Creating a user 'add custom field' section

I'm trying to make this plugin where users can add a custom attribute for something i working on: So far what i've done is: which uses this code here: window.addEventListener("DOMContentLoaded", ...
-1
votes
0answers
12 views

How to add custom fields to a form?

How can i add simple text input custom fields to this kind of front end submission form? The code <form id="new_post" name="new_post" method="post" action=""> ...
0
votes
1answer
22 views

update_user_meta(): invisible data storage

I try to customize users profile using this code (from this tutorial) : <?php function extra_user_profile_fields( $user ) { ?> <h3>Autres</h3> <table class="form-table"> ...
0
votes
1answer
29 views

Get a different meta value with ajax when different elements are clicked

I have a custom post type of Hero, and each hero has some spells with spell icon, name, description stored in custom fields (repeatable fields through the "custom fields suite plugin"). What i want ...
0
votes
0answers
48 views

echo value from 'select' field type into page template using cmb2?

I'm using CMB2 plugin to add metaboxes into a custom post type. I'm adding the additional metaboxes via functions.php onto child theme. It may worth to mention that parent theme/custom post already ...
0
votes
0answers
17 views

Custom Field value to

I don't know how I could solve this problem. I'm importing a csv file and this contains also an imglink (external) and it will creat a post draft for me. What I want to achieve is that the imagelink ...
3
votes
1answer
52 views

Fetch and show multiple custom fields via AJAX

I am trying to fetch custom field values from database and show them on page. I am able to do that for single custom field but not sure how to do that with multiple values at once. Here is my ...
0
votes
1answer
52 views

Mathematical operations on custom field values? (updated)

I'm attempting to write a function, run by a cron schedule at midnight every night, that will subtract 1 from the integer value of a custom field. It will function basically as a countdown timer for ...
0
votes
1answer
41 views

Two plugins sharing the same custom post type registration

I have two plugins Plugin A and Plugin B registering the same post type exp, aws_employee. Each plugin offers different functionality but the post type type they share is exactly the same. If I ...
0
votes
0answers
47 views

Calculate the total of 2 meta values and ORDERBY

I've configured products in WooCommerce to use a point system (either 0 or 1) using Advanced Custom Fields and would like to order the products by these values - there are 9 options in total per ...
0
votes
1answer
43 views

Extend WP_User_Query or WP_User to return all custom fields?

I'm trying to pull out list of about 5000+ member records for CSV export. The query is timed out and I suppose the reason is that in order to populate the CSV file I need to iterate over those 5000 ...
0
votes
0answers
45 views

How to sort category by custom field value

I am using the following : $catargs = array( 'meta_key'=> 'category_custom_order', 'orderby' => 'meta_value_num', 'order'=> 'ASC', ); but I can get the ...
0
votes
1answer
20 views

Best way to create a search for custom post type by custom field values

I have a custom post type called people. I want to have 3 search fields for; first-name, middle-name and last-name I was thinking about creating a page with my own search boxes and use query_posts: ...
0
votes
0answers
10 views

How to retrieve a post by inputing the url in a custom field and displaying it on an options page

If have an options page where I have a custom text field and I want to paste a url of a post in that custom field and retrieve the Post Title and Excerpt and display theme above the custom field and ...
0
votes
0answers
39 views

Meta box from child theme

I've done some searching and can't find exactly what I'm looking for. I've found this, removing meta boxes but I need to add. I did try changing that to add meta box. I'm wondering if it is possible ...
0
votes
1answer
27 views

Display Data From This Custom Media Upload Meta Box?

This plugin is working without any issue on CMS. Now I need to know how to properly display them in my post. Custom Media Upload Meta Box Plugin. $meta_box_media_upload = new ...
0
votes
1answer
30 views

add custom field to custom post type

I want to add custom field of file uploading control to upload image files in my custom post type page(New/Edit). I have searched in Google but no tutorials have been found. please, help me. Thanks in ...
0
votes
0answers
14 views

Quicktag button to automatically add a custom field to a post

Is it possible to add a quicktag button to the Wordpress add post editor which when clicked will automatically assign a custom field to a post? Sometimes I have 50 scheduled posts, 30 of which have ...