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

learn more… | top users | synonyms (2)

0
votes
1answer
30 views

Display custom meta on page that has been check in custom post type

I have created a custom post type (cpt) and within each post type is a custom meta field. This custom meta field displays all the pages that can 'checked'. Code to generate the custom meta box: ...
0
votes
3answers
37 views

Where WordPress Stores The Custom Fields Values

I have a custom Post type called product which has a Methabox with a Custom Field Called Price I entered $ for some of the products and I need to remove them from the WP table. Now can you please let ...
0
votes
0answers
26 views

metabox inside custom post

i'm trying this to add metaboxes inside custom post but never show the metabox Function Reference/add meta box « WordPress Codex Example: But never show this inside custom type post, Only inside ...
0
votes
1answer
22 views

Sort WP_Query with numeric custom field

I have added a numeric field (called 'video_order') to a certain post type, via ACF. I would like to sort the list of posts, by that numeric field. I have made sure to go through the posts and give ...
0
votes
1answer
40 views

Get custom field outside wordpress loop on new php page

I want to get a specific custom field value to display outside the wordpress loop in a new php page. right now im using the code below, which is doing what i want but in a ugly way. i need to exclude ...
0
votes
1answer
18 views

Retrieving Advanced Custom Field within Shortcode Function [closed]

I'm trying to do something that seems like it should be (and probably is) simple: display the result of Advanced Custom Fields get_field() call within the return of a shortcode function. Within a ...
5
votes
2answers
167 views

Having different sidebar content for MANY pages?

I am continuing on from a topic I already posted but with a different angle. Please bare with me as I try to provide as much information as possible. I am looking to add a simple text area called ...
0
votes
0answers
38 views

Retrieving custom post type fields without a post

I have reviewed this question, however I don't think that's good enough for what I want to do. I'm developing a plugin that needs to be aware of different fields available on custom post types, so I ...
0
votes
0answers
37 views

Adding custom fields multi value using json-api

I'm using json-api to create a post with custom fields using query: ...
0
votes
0answers
12 views

All Metaboxes on position 'side'

I added a few custom metaboxes to my custom post type. I did add one of them with position 'side', but to others I said 'normal'. Now all the metaboxes are showing up on side, even the ones which ...
0
votes
1answer
26 views

Best way to insert a js script in the header with custom fields and CPT

I'm working on a Custom Post Type that'll function as a landing page. The landing page has several custom fields with meta infromation, theres no problem with that, it works well. But my client wants ...
0
votes
0answers
13 views

Creating a custom form with a repeatable row and conditional showing of fields

Would love some guidance. We tried Advanced Custom Fields (ACF) and hit a snag. Basically in a custom post type, we want to create a repeatable set of items. When an end user adds a repeatable item, ...
0
votes
0answers
21 views

Displaying no post message in rather complex query that shows only future events

I'm trying to do something rather simple, which is display a message if there are currently no posts available. However, the environment I want to do it in is rather complex, as I'm using the Types ...
0
votes
2answers
31 views

How can I query on the year part of a complete date in a custom field?

My posts have a custom field named production_date and formatted YYYYMMDD. How can I form a meta_query to select only the YYYY part? $meta_query_args = array( array( 'key' => ...
0
votes
0answers
19 views

Custom Fields “Load value based on the post's terms and update the post's terms on save” Setting

What does this setting do? Filtering my CPT Archive only works when I have this enabled, so it must be a good thing. However, I am not the person who made this WP site, so I do not know why this ...
0
votes
2answers
32 views

Variable Products as custom post types

I'm building a site for ordering food online. It's not a shop (visitors will not be able to pay online, just to order for delivery). My initial idea was to define all the food and drink items as ...
0
votes
0answers
32 views

MetaBox autocomplete field with another custom post type?

I am using the MetaBox.io plugin and creating a post type called "Book" which I am trying to relate to another custom post type called "author". How can I create a custom field for Books that would ...
0
votes
0answers
23 views

Query and compare multiple meta values

The problem: I have a custom post type of 'events' which has two metaboxes: cf_eventdate and cf_eventend. The first contains the event date, in the format: 2015-11-05. The second contains the end ...
1
vote
1answer
30 views

Custom field value not saving when it contains a URL?

I implemented a custom field into one of my post formats called 'url'. When I enter a random string of characters into the field, it saves just fine and I display it in my template like this: ...
1
vote
1answer
39 views

How to loop over custom fields in a page template?

I was originally using a single field and things worked perfectly with the following code. Now I need to alter it to loop of several fields that are similar. To start: I've created several custom ...
0
votes
1answer
60 views

How can I output WPAlchemy repeating fields meta values in my page template?

I have a custom post type, Downloads, which contains some custom metaboxes, including a repeating field. I'm able to output the values for all of them in my page template, but I'm not able to output ...
0
votes
1answer
22 views

Query Posts based on custom field value

Currently building a site and need to create a 'Schedule' to display a Presenter that is on air at a particular time. Using ACF plugin to enter a time that the presenter goes on air which saves the ...
0
votes
0answers
20 views

Changing the body of mail sent to new user registration

I am practically new in this community / forum, I hope to be as clear as possible about this question. I would like to change the body of the email sent to new users registered on my site, since only ...
0
votes
0answers
12 views

Saving sorted CPT with CF

I'm using WP-types to create custom post types and custom fields. Using CPT and CF, I've created photos gallery assigned to Posts. When I'm sorting them by "Wgraj zdjecie" and click save all, it ...
0
votes
0answers
16 views

How to format the various types of custom fields?

So i am ready to throw in my custom post type a bunch of custom fields. All these fields need specific handling for their input and validation. Exmaples: Numeric fields E-mails WYSIWYG editor ...
2
votes
1answer
121 views

How loop through posts based on custom fields

I want to loop through posts and show only those posts for which the custom field i.e _shopis not empty I am always confused with meta query and even not sure that if this is possible using this ...
0
votes
0answers
16 views

Problem saving meta data

I'm making my first WordPress plugin. I used an example to save text that an administrator enters when submitting a new post, but the meta data is not saving. Can anyone help on that? /** * Adds a ...
0
votes
0answers
10 views

Custom Search Doesn't FIlter Based on Custom Field

I am trying to search various post types based on a custom field equal to a certain value. However when I do my search, it's ignoring my filter. Here's my code: function ...
1
vote
0answers
19 views

Adding Page Templates to post but it ignored it

I follow the post to add the template metabox to a custom post type's editor, but it doesn't work. When I visit the post, it shows "NOT FOUND ANY POST" which looks like index.php or single.php ...
1
vote
1answer
20 views

Rewrite and custom post type: order by custom field not working

I have a custom post type "placement" with a custom field "position". What I want to do is, on the placements archive page, to order results by the "position" value. I have the following URL rewrite ...
0
votes
0answers
15 views

create custom field dropdown

so far I'm using custom field on my theme to display dynamic content, for example: <?php echo get_post_meta( get_the_ID(), 'product', true ); ?> <?php echo get_post_meta( get_the_ID(), ...
0
votes
1answer
14 views

Using custom field as 'orderby' value causing post grouping by publish date

I am using WP_Query. Here is my query: $my_query = new WP_Query('category_name=test-category&posts_per_page=-1&meta_key=sort_name&orderby=meta_value_num&order=ASC'); Why is it ...
0
votes
0answers
22 views

Filtering by custom fields select?

I have a custom template listing all the posts under a category x. This is how my current loop looks like: <?php query_posts('cat=522'); while (have_posts()) : the_post();?> All the ...
0
votes
1answer
25 views

Custom Fields with get_post()

I am using get_post() to call a single Wordpress post using it's post ID. I have successfully managed to pull the content / title of the post but would like to also pull custom fields also. The code ...
0
votes
2answers
20 views

How to properly get popular Posts by multiple Values

I am trying to display Popular Posts on my website, selected by a mixture of Views and Comment Count. Since views are always way more than Comments, I am multiplying the Comment Count by X, but it ...
0
votes
1answer
36 views

Creating connections programmatically with common fields on CPT's

I'm trying to create a programmatic connection between two CPT's that have a common field (id_number). For example: CPT "City": post_name:New York id_number:34 CPT "Color": post_name:Red ...
0
votes
0answers
20 views

Creating custom post type with custom taxonomy and custom fields programatically

I need to create a custom post type. This post type will have a custom taxonomy. Also this post type will have custom fields. I dont want to use any plugins to do it, i want to include the creation ...
0
votes
0answers
25 views

Run query with meta key via AJAX

I'm completely new to AJAX, and I can't seem to find anything that's pointing me in the right direction. I have a table that contains one row for each post in a post type. Each row contains the posts ...
0
votes
0answers
20 views

Tracking logged in users page visits

I need to be able to track logged in users (excluding admin) and know When a user was last active on the site When they last visited specific pages (and ideally their first visit to the page and ...
0
votes
0answers
12 views

Attempting to add an imagemap/ content to Front Page — shows up only in meta description

I'm dealing with a nasty old theme for a friend that uses a huge slider as its homepage background image. I'd rather not scrap and recreate the site, as back in the day I put in a good amount of ...
0
votes
0answers
38 views

Insert a custom taxonomy as a class in acf gallery loop

I am almost there, but not sure how to echo out a custom taxonomy as a class into my div containing my image. (see all the stuff below). All of the tutorials I see talk about using wp_query and then ...
0
votes
1answer
41 views

How can I sort get_users() by any value (last_name, user defined fields and more)

I want to sort the result of get_users() by last name, first name, user defined fields or whatever. How can I achieve this while still using get_users()?
0
votes
0answers
28 views

How to export data from a custom Meta Box added into categories

I have a custom meta box (text input) in the categories to insert the 'Meta Description', and when I export the data by using Tools > Export, this meta box is not exported. Actually, the content of ...
0
votes
1answer
18 views

Querying a large number of posts including their custom fields data

I'm building a SVG map separated into about 200 regions. For each region there are attributes that describe it, as well as a region ID. These regions are just polygons in the SVG. I setup a custom ...
4
votes
2answers
212 views

When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?

When adding arrays to post meta, using add_post_meta, new sub-arrays are added. I was wondering if there was a way to have those sub-arrays named. so instead of ending up with array([0](2,3), ...
0
votes
0answers
25 views

Login with user in custom created table

I was trying to add more features in login page, that i created a extra "myusers" table and trying to add two tabs in login screen,with the second tab i want login using my created users in 'myusers' ...
0
votes
2answers
26 views

Amend posts using wp_insert_post

I'm currently working with an XML feed to add posts to a custom post type using wp_insert_post(). It's all working fine but I was wondering if there's a way I can check if the post exists and amend ...
0
votes
0answers
27 views

Admin - Search Events by a custom field

I am using the events manager plugin and i created a new field using custom fields plugin. I don't know how to make the search from wp-admin to filter using the custom field i added. For details ...
3
votes
1answer
118 views

Multiple meta values for same meta_key adding on “Preview Changes” hit but not on saving or updating post

I'm taking multiple location values with each post, so it's an array (always). My post meta form field is like so: <select name="<?php echo $project_prefix; ?>offer_locations[]" id="<?php ...
1
vote
0answers
27 views

Custom dropdown field added to media gallery; how to get it to save properly?

I am using the following code to add a couple of custom fields to media attachments: //Add custom fields for attachments function kgal_add_custom_fields_to_artwork( $form_fields, $post ) { ...