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

learn more… | top users | synonyms (2)

0
votes
1answer
5 views

Echo out custom fields in comments

I am trying to figure out how to echo 4 created fields from a plugin in my theme template for the comment form and customize the comments output as well. The plugin I am using lets me add custom ...
0
votes
1answer
6 views

php if, else & custom fields - syntax error

I'm just starting to use custom fields and would like to use it to display an author box with (1) author photo (2) author name (3) author bio. I use this code in loop-single.php and it works fine: ...
1
vote
1answer
20 views

Custom page template with custom fields

I need to create a page template that has an image and text with a common style. The image url must be set using a custom field (or something like it) and left aligned to the page title and content. ...
0
votes
0answers
11 views

Sort custom post type by multiple custom fields

I have 4 text fields in a custom post type. How can I sort the posts by this order of text fields: brand_fbn - model_fbn - year_fbn - plate_number? This is my code, which isn't working: $ins = new ...
-1
votes
0answers
26 views

How to add repeater field to option page?

I've created an options page for blog. In this options page, I can save some details about the website. using this code: add_action( 'admin_menu', 'site_add_admin_menu' ); function ...
0
votes
1answer
18 views

Generating and downloading files with WP API

Lately I was challenged to implement functionality that would allow users, editing specific custom post, to download json file based on meta of that post. I finally managed to complete the task (well, ...
0
votes
0answers
14 views

Get Meta Values and Count based on Meta Keys

Is there a function or a script to get the distinct meta values given a meta key and post type? I was hoping for a function similar to get_terms() for taxonomy. In addition to each meta value, there ...
0
votes
0answers
10 views

Add a custom field to WordPress posts which could be filled just once

I am familiar with custom fields, as you know when you filled a custom filled and submit the publish post then you can edit your custom field in edit post page. I want author can fill the custom ...
0
votes
0answers
14 views

Adding filter menu to admin custom type list to filter by custom field values having issues

I've been working on this for a bit and am having some difficulties because I can't understand for certain what is going wrong and why I'm getting the error that i am. It's hard to tell if it's a WP ...
0
votes
1answer
40 views

How to get the first letter from custom field?

I have a custom field 'first_name' created by ACF advanced custom fields. I use this code to get the value from the field: the out put would be something like Mark. What I need exactly is getting ...
0
votes
1answer
27 views

How to delete comma from the end of results? [on hold]

I use ACF advanced custom field to add a custom field "authors" to "articles" post type. Authors field is a relationship field which relate Articles post type with Authors post type. I want to display ...
0
votes
1answer
24 views

Meta box not saving spaces

I got a meta-box. And it is almost working as it should. Except that it is'nt saving spaces. For example if I enter London City the data saved will be LondonCity I have taken a look at this SE: Why is ...
0
votes
0answers
11 views

i want to create a shop with single customisable product [closed]

my job is to create signs for clients but every client have his own specification (color,size,text,material ,...) all i want to know is it possible to do that with WordPress and if yes how?
0
votes
1answer
30 views

Using ACF Custom Field value in a URL with do_shortcode() [on hold]

I am using the ACF custom fields and video.js plugins and I want to add the custom field value inside the url for the youtube video that is inside of do_shortcode() So far this is what I've come up ...
0
votes
1answer
16 views

Does Wordpress support template resources/custom fields

I'm pretty new to Wordpress development but say I want, based on my theme's page template I want to create a custom variable. Ultimately the idea is to create a variable that appears as a field on ...
0
votes
1answer
9 views

Get meta value when the page is a blog archive

I'm using custom metaboxes on my pages. For example: header icon. I created a page for the news on my site. I selected it as a blog archive page under Settings->Reading page. Unfortunately I can't ...
0
votes
1answer
21 views

How to use TOC with ACF?

I'm using ACF advanced custom fields plugin to create custom fields for my CPT where i replaced the content editor of my CPTs with a custom Wysiwyg Editor field (field name: full_text) from ACF in ...
0
votes
0answers
13 views

Add WYSIWYG to Image Description field

I need to build this thing: It's essentially an image with a caption, and it can go inline anywhere in the text. I could just create a shortcode for it I suppose, but I'd really like to integrate ...
1
vote
1answer
9 views

Custom Taxonomy to dropdown box on adminside wordpress

Can I create a country- location hierarchy using custom taxonomy on admin side. When selecting a country from select box , an another box should see the list of location comes under that country. And ...
-2
votes
0answers
38 views

I have a problem in check box that could not checked in previous value for post editor panel [on hold]

how to give checkbox will checked in previous condition? I need a perfect code pls.
0
votes
1answer
7 views

How to filter a taxonomy meta field to the 'single_term_title' filter hook

To show terms in Bengali I enabled term meta fields, saving data into options table. I made a custom function (get_term_meta()) similar to post_meta to fetch my taxonomy meta data, that takes term_id ...
0
votes
0answers
17 views

How to add custom sidebar on each single page?

I'm creating a book review site. I wanted the site with two columns (65% 35% respectively). On the left side as usual review of the books and other stuff should go, so no worries with that part. On ...
0
votes
0answers
17 views

Using upload prefilter to add image to custom field - problem with saving

I'm developing a plugin with which a pdf can be uploaded and from each page a jpeg version is generated and added to a custom field (advanced custom fields gallery). I'm using the ...
0
votes
0answers
7 views

How to add character length condition to WP-CMS fields?

I created a custom module with the help of https://wp-types.com/ plugin. Everything seems fine but I want to include a character length condition for my CMS custom field (NOT FOR THE FRONT-END). ...
0
votes
0answers
7 views

Render custom gallery fields

I'm trying to add a custom setting field to a gallery and render it as a class in the HTML. So far I have implemented this solution which works perfectly. Here is the working code: function ...
0
votes
1answer
23 views

WordPress Search Custom Meta Field Only

I have a recipe site where each recipe resides in a custom meta field called "recipes". I only want the contents of the meta field searched when users search the site. The problem with my code below: ...
1
vote
1answer
20 views

how to filter by last name for custom post

I have a custom post type (speaker) and I would like to load the list of speakers sorted by last name. I can't seem to figure it out. I tried the code from this post: ...
0
votes
0answers
30 views

Bulk Edit Media Including ACF/Custom Fields

I have two main questions but here's the scenario. I run a festival website. Photographers will upload photos to the site. They will need to relate it to an Artist and an Event, so when viewing the ...
0
votes
2answers
69 views

woocommerce custom field not updating user meta

I have a custom field created on my woocommerce checkout page that saves to db and shows on the order page. I want it to also update in the user profile as it won't change very often (if ever). The ...
0
votes
1answer
7 views

Saving and using Custom Field in user settings/profile “Checkbox list”

Referencing this question: How to add/save Custom Field in user settings/profile "Checkbox list" I've been trying to get this working, but am having a few issues. I'm using the following ...
1
vote
2answers
18 views

I want to send an email when each post is published

For each post, I want to send an email once it has been published. The email address is stored in a custom field. I have added a custom field . I have got your_email for the 'name'and the value is ...
0
votes
1answer
16 views

Why WordPress takes time to make request to save post?

I have around 50 post meta fields, each meta field have different values. I have noticed when saving posts, it takes around 3 to 4 seconds to make request. Why?
0
votes
0answers
17 views

Query for showing posts where the gallery custom field, ACF gallery custom field plugin, is not empty [closed]

I'm using the gallery add-on for advanced custom fields wordpress plugin to add images to individual posts which I then display as a gallery using liquid slider. On a single post page I display the ...
0
votes
0answers
12 views

Custom Post Type On Publish Update Meta Field

I'm wondering if someone can shed some light on how I can update a custom meta field value, when a new post is created in a custom post type? Specifically, I have a custom post type named ...
0
votes
1answer
14 views

Text in header as a page - hide from Web crawlers

In some parts of my template, like in the header of my Wordpress website, I have custom text like "Any question ? Contact us: +33 00 11 22 33". These texts are managed as a page : in the template, I ...
0
votes
0answers
18 views

Custom Metabox Always shows box and checked

I am running the below code to create a customer metabox on a page if a specific template is applied. Everything shows up fine however there is a problem. If I tick the box and save the page loads ...
0
votes
1answer
30 views

Creating a widget with a number of custom fields

I am attempting to create some custom widgets. I have created one, which only needed a different title field. However I am now stuck when trying to create a widget which allows me to have multiple ...
0
votes
2answers
17 views

Make a custom column sortable by a value from a different custom post type

I've created some custom columns to display my custom post types more attractively in the admin section - the columns are mostly custom fields. Mostly, this works absolutely fine, and I can sort by ...
2
votes
1answer
62 views

Execute/Parse Shortcode in Native WordPress Custom Field Value Field

I've spent some time searching for a solution but have not found 1 single example of how to do this. I would like to place a shortcode in the value field of the Custom Field meta box in WordPress so ...
0
votes
1answer
18 views

Add a custom class to the body tag using custom fields

There are certain posts where I want to manually append a custom body class to using custom fields. How do I go about it appending the class to the body tag when a certain custom field is added to a ...
0
votes
3answers
25 views

Need help getting a certain value out of a multi dimensional array

I'm looking to retrieve a specific meta value for users from the Wordpress types plugin. I know the value is stored in a wpcf-team-experience-member-type. This is a checkbox option and I'd like to ...
0
votes
0answers
16 views

Query key values within current taxonomy

I have custom field: cb_color - with different values. (ie: blue, red, brown, ..etc) I have this code inside the taxonomy template file. It queries and outputs the correct values - matching posts with ...
4
votes
1answer
127 views

So much data in postmeta

Last year started using custom fields and in one year I have 230,540 rows in wp_postmeta table. This year will add more data and new fields and I don't know what to do, to create new table or continue ...
0
votes
0answers
38 views

Order Custom Field by Price

First of all i've found numerous, topics, and, issues about ordering a WP_Query by its custom field value, but somehow all the proposed solutions don't seem to work for me. I have a custom field ...
0
votes
0answers
16 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
52 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
39 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
48 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
31 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
33 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? ...