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

learn more… | top users | synonyms (2)

0
votes
0answers
14 views

how can i create a custom field for the areas marked with red in the image

how can i create a custom field for the areas marked with red in the image
0
votes
0answers
9 views

Meta Query Filter by Tag

I currently have multiple pages, and in each page is a custom field which is named 'country'. In the 'country' field I have this value 'uk, usa, brazil'. What I'm wanting to do is display posts on ...
0
votes
1answer
38 views

Query Posts by Custom Field

I'm looking to query my posts via a custom field that I've created on my page. But the custom field is an array of values. So the custom field 'country' could look like this country => ...
0
votes
1answer
25 views

Show comon custom field results?

There is custom field "color" in posts with set of hex color codes (all in one custom field, separated with one space). Examples of custom field values for 5 posts: "000000 f0f0f0 c0c0c0 202020 ...
0
votes
1answer
29 views

Search one custom field?

In posts there is in custom field named "color". I have custom search page template, and I would like to show search results only from that one custom field. How to limit search to look just in one ...
1
vote
1answer
19 views

Complex WP_User_Query call fails on production server

I'm having a very specific and hard to debug problem with a complex meta_query in a WP_User_Query call: I'm using this (simplified) code to built the query: // custom user role $arguments = array( ...
0
votes
1answer
23 views

List all unique custom field values?

I use this code to list unique values of custom field name "authors" from all posts. It works just fine, but I would like to limit results, to get values which appear in at least for example 20 posts? ...
0
votes
0answers
9 views

Publish post and create additional posts with same content

I'm building a site which allows authors to create a custom post type, and optionally elect to create X amount of additional posts with the same content. In this case all the content is meta values. ...
0
votes
0answers
9 views

Remove metabox container and header

Is it possible to remove the whole header of my metabox (title+toggle icon) and the container (.postbox) ? I wonder I can use css to remove them, but is it the best solution?
0
votes
1answer
30 views

query_posts with meta_value

I have category 'news' http://localhost/foldername/news, for each 'news' posts I have custom field called 'years' and is set up as a Text Field. I have 2 values assigned n different posts '2013' and ...
0
votes
0answers
12 views

Use ACF fields instead of Yoast SEO for storing keywords, description etc

I like minimal and the more I can do without plugins the better. I'm wondering whether using some custom fields from ACF plugin as fields for: meta keywords, meta description on every page / post ...
0
votes
0answers
16 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
15 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 [on hold]

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
17 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
18 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
16 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
17 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
10 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
18 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
9 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
5 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
12 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
30 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
13 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
126 views

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
57 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
45 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
38 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
68 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
67 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
15 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
30 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
50 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
53 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
54 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
42 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 ...