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

learn more… | top users | synonyms (2)

2
votes
0answers
310 views

Create child page within custom post type

I want to be able to have a link like this, site.com/my-custom-type-slug/single-custom-post-name/stats/, where /stats should contain the /my-custom-type-slug page content and when I add content to the ...
2
votes
0answers
263 views

Copying Custom Meta Values from existing post to a duplicate post

I'm trying to revise an existing WP plugin BU Versions to accept different custom meta field values from items I've set-up using the Advanced Custom Fields (ACF) plugin. BU Versions will copy over ...
2
votes
0answers
257 views

How to put enctype=“multipart/form-data” in categories form?

I had success putting the code below to include enctype (for images) in custom post type forms, but I'm not able to use it in categories form... is this possible? Thanks. add_action( ...
1
vote
0answers
62 views

Is there any way to add a “custom field” to the CPT archive page?

as per my title I have a CPT with an archive. I'd like to have my archive main page (the back end) displaying two custom fields that would allow me specifying the "meta tag description" and "page ...
1
vote
0answers
90 views

Removing “s” from search with custom parameters

I'm trying to do something that I thought would be quite simple and has turned out to be not simple at all. I've seen quite a few posts that look similar at first glance but none solve the issue for ...
1
vote
0answers
50 views

Custom code for WordPress dynamic menu

Without using plugins, how can I create a custom WordPress navigation menu to produce the following code? <div class="bottom_section_full"> <div class="bottom_section_left ...
1
vote
0answers
58 views

How to show a post if was published less than two hours ago?

I want to show posts only that were posted less that 2 hours ago and have the custom field "¿directo?" with the value "Sí". These are my progresses, but they don't work: Functions.php: function ...
1
vote
0answers
63 views

How to save the date/time of last update of an extra user profile field?

I have a function that adds and saves very well an extra field to the user profile. But, because the content of this field gets old very quickly, I need to know when the user refreshed it last time - ...
1
vote
0answers
274 views

How to use custom fields to enable sticky posts on custom post types?

Background: The Wordpress Answers site has two questions which ask about how to enable sticky posts on custom post types (see how to make custom posts sticky? and Enable sticky posts to custom ...
1
vote
0answers
219 views

How to populate custom field dropdown box based on prior selection?

I have two dropdown boxes for a search that uses custom fields and I need the second dropbown box to be populated depending on the results of the first box. So far I have: <form role="search" ...
1
vote
0answers
98 views

How can I include the custom field in Woocommerce in my IPN

I use Woocommerce plugin. All works great, I have added a custom field or attribute to a product which is fine and it shows on the products detail page but my problem is getting this data to come ...
1
vote
0answers
103 views

Custom Post Fields at the beginning of a Custom Permalink

Is there any way to have a permalink begin with a custom post field? For example, the follow works: $wp_rewrite->add_permastruct('solicitors', '/anything/%custom_field%/%custom_field_2%', false); ...
1
vote
0answers
88 views

Possible to filter custom post type with multiple meta data?

I'm wondering if it's possible in one loop to accomplish what I need to do. What I would like is to sort all custom post types by the meta data of county and put them in order which it is doing here. ...
1
vote
0answers
54 views

How can I append custom data to images in the editor?

I've added a custom meta field to my image details so that a client can add a number to their photos (a design choice). The data would need to show up under each image (like a caption) inserted into ...
1
vote
0answers
83 views

Hierarchical custom fields

I need to display press statements as a custom post type ("statement"). Associated with each statement post type is one or more Authors, which is currently implemented also as a custom post type ...
1
vote
0answers
274 views

How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?

Actually i have created a custom post type and fetch the data from "Advanced Custom Fields" plugin after then connect to a custom search-form to search only the post data.It works good. But now i ...
1
vote
0answers
491 views

Custom WP_Query for WordPress Search Results with meta_query

I am using a custom query to generate my search results. The code I am using works perfectly without the meta_query variables in my arguments array. I am trying to compare multiple custom fields with ...
1
vote
0answers
293 views

Unique key for each row in a repeater field

Is it possible to have a unique key for each sub fields in a repeater field? I don't want to use the array index, because the array index can be changed, when adding new rows between existing rows. I ...
1
vote
0answers
82 views

Meta Query And/Or

My question is very similar to Meta Query with AND & OR? . This question was answered in 2011 by @Otto. With the exception that my logic is different. I want to query, for example, posts with ...
1
vote
0answers
154 views

$form_fields from attachment_fields_to_edit returning empty array

I'm trying to remove the caption field from non-images attachments' edit page, which should be a simple matter of unset($post['post_excerpt']), but I can't unset a non-existent value... Looking at ...
1
vote
0answers
35 views

How to link keywords in custom fields?

I have come across different WordPress plugins that will automatically link/hyperlink keywords--to external links--every time they appear throughout posts. Here's an explanation of what I mean: Site ...
1
vote
0answers
91 views

Updating Other User's Metadata

I have created a custom user meta field, and that value is being used to get data from an external API and display it on the user profile page. On admin pages I have used the following code to make ...
1
vote
0answers
34 views

Displaying and searching Custom Posts

I'm trying to convert my existing web site from old-school HTML to WordPress, and have created a series of Custom Posts for my whisky tasting notes. However, I'm stuck trying to set up a page that ...
1
vote
0answers
30 views

URL Rewrite fires when retrieving a custom value?

I'm working on an old WP Multisite instalation (3.0.1) and something weird is happening. The guy who built the site made a decision to store direct URLs instead of Post IDs to a Custom Field. And ...
1
vote
0answers
566 views

Uploading PDF using Media Uploader

I have been using a custom code to upload images to Wordpress using custom metaboxes. Here is the code: <script type="text/javascript"> jQuery(document).ready(function( $ ) { var ...
1
vote
0answers
87 views

Add first url to custom field on publish_post

I post a lot using Press This and I allow other users to post. Lately I noticed some duplicates and I m trying to find a way to stop this. I am trying to get the first link from the post, add it to a ...
1
vote
0answers
333 views

Meta query with multiple custom fields for archives page ordering problem

I'm modifying the query for archives pages so that the posts showing up on year, month or day pages are queried by there custom field (start-date and end-date) and are sorted by custom star-date ...
1
vote
0answers
71 views

Why orderbyb meta_value_num won't affect the generated SQL Query order?

I've exhausted myself with this and I couldn't figure out why when I do this $myposts = new WP_Query( array('numberposts' => 5, 'offset' => '0', 'post_type' => 'noticias', 'orderby' => ...
1
vote
0answers
172 views

Multi-select field for Taxonomy can't save the value

I'm trying to create a multi select field for Taxonomy pages, and the problem is in saving all the selected values, for example if I choose couple of elements in the select field and save it, it will ...
1
vote
0answers
64 views

Show fields based on taxonomy selection in editor

I use GD CPT plugin for custom taxonomies and post types. I wonder if it is possible at all to change the fields user sees in the editor, based on something else (lets say a taxonomy). Example: I ...
1
vote
0answers
432 views

filter custom field values $min $max

The user needs to query posts by entering a $minPrice, $maxPrice and a category value. Here is my query which returns no results: function result() { $result = array( 'cat' => ...
1
vote
0answers
69 views

Custom field query without duplicates results

I have categories as cities like london or new york I also have a custom field called Location where I usually put the name of a restaurant. I am trying to show on a separate post/page all the ...
1
vote
0answers
111 views

Automatic Shortcode Creation with Custom Fields

This is basically a php issue as I'm fairly new to it and can't figure out how to code things the way I want. I am basically trying to pull information from custom fields (grid reference) and post ...
1
vote
0answers
443 views

filter search custom field query

I'm looking for way to filter search results. This is what I have so far a custom post type of "doctors" in each "doctor" post, there are numerous custom fields (male or female, location, ...
1
vote
0answers
333 views

Dynamically create check boxes for given post titles in WPAlchemy

I'm using WPAlchemy to create meta boxes. What I want to do is to dynamically create a group of check boxes with post titles. In other words, I want to replace a, b and c with the query of post ...
0
votes
0answers
23 views

Multiple meta data one label

I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have, function ...
0
votes
0answers
17 views

Stop registration field validation from running based on condition

I have am trying to customize the registration process for a wordpress/buddypress site. Each user must either select a pre-existing company from a dropdown box, or if the company does not exist, they ...
0
votes
0answers
16 views

Custom field with subdomain

I am currently having a problem related to the display of custom field article is "language" Specifically as follows: I have a blog with multiple applications for mobile phones, as this blog ...
0
votes
0answers
12 views

Only display custom fields that are associated with template

I am in a predicament where I have entirely too many custom fields displaying in my admin. Ideally I would like to filter through all custom fields created for my site and only display the ones ...
0
votes
0answers
26 views

Undefined index error when saving content on metabox

I am trying to debug 'undefined index' errors on the WP backend when debug is set to TRUE. The offending lines are: if ( !wp_verify_nonce( $_POST['pdwt_meta_noncename'], ...
0
votes
0answers
20 views

display some fields in custom post backend

I am using the following code for the custom post.But i want three fields i.e Location,Persons ,Client to permanently appear in the backend of the custom post rather than having to create and select ...
0
votes
0answers
27 views

How to save dynamically generated value in post type?

I'm trying to use the count of the amount of people that register a post id to a table in the DB. I want to save this COUNT value to the post_meta so when I display the list of posts it can also show ...
0
votes
0answers
95 views

get url image of custom field with custom size - get_post_meta, wp_get_attachment_image_src

I use a custom WP_Query to load image and other information from custom post type event to supersized.js script. This query get all custom post type event with custom field wpcf-img-event not empty ...
0
votes
0answers
16 views

Custom post with custom category and custom meta box query and order by custom_value

Im building a Library CPT= Libro Custom Taxonomy= categoria_libro (as category) Custom meta box which has: autor editorial ciudad año As it says in the title, I need to query a custom post ...
0
votes
0answers
26 views

conditional logic for front-end custom field edits

I'm just starting to learn php/js and would like some recommendations on the best way to setup my logic: Goal- Display the value in a custom metafield in the custom post type. If the user is the ...
0
votes
0answers
7 views

Default Custom Field User Data

I want to create a user meta that would either add or update In the user meta there are two custom field 'projects' and 'amount' so if user donated $1 to project A the user meta will create a row, ...
0
votes
0answers
51 views

Conditional logic Advance custom field

i try to use this code to have a conditional logic form some field on back-end on ACF Plugin. I have a select HTML field with si/no (yes/no). If i select no, nothing show but if i select yes appares ...
0
votes
0answers
30 views

Calling Custom Fields within a category loop?

What I'm trying to do is to display a specific category post listing within a page template, showing only each post's custom fields, which must be pulled and included within the following html. What I ...
0
votes
0answers
15 views

Nested Meta boxes?

I am trying to set up a plugin that will add a meta box to the posts admin page asking one simple question: How many authors will add their 2 cents? The question is in a dropdown with a possible 4 ...
0
votes
0answers
18 views

Wrap URL around custom field checkbox array

I have a custom field of checkboxes for choosing an "Area of Expertise" that was created using WCK (WordPress Creation Kit which I'm using to create CPTs and Custom Fields). I don't know if this is ...