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

learn more… | top users | synonyms (2)

2
votes
0answers
380 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
313 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 ...
1
vote
0answers
28 views

Add a custom meta box in the post options that loads some html code in the header

I run a blog that is built in the format - Logo - Nav Large Image + Email Optin Form Content / Sidebar Footer Now I want the large image and email opt in form to be optional. Right now, what I ...
1
vote
0answers
48 views

frontend image post uploader

I've set up image uploader on front end custom form for users with some text input, textareas etc .Everything works fine, untill I decide don't upload any image. Then my "thank you" page gets blank. ...
1
vote
0answers
36 views

Custom Field to a Role?

Is it possible to add custom field to a custom role? Say I want to create roles that represent a membership level and want to add billing options to it. So it'd look like this: Membership level ...
1
vote
0answers
54 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'], plugin_basename(__FILE__) )) ...
1
vote
0answers
55 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 ...
1
vote
0answers
63 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
121 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
75 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
66 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
84 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
427 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
231 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
150 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
105 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
131 views

Custom Posts Hierarchy? (State/City/Restaurant)

Question: What is the best way to create a hierarchy structure (also called parent/child relationships) between custom post types? For example, we currently have 3 post types: States, Cities, and ...
1
vote
0answers
1k views

Integrate Custom Post Type Events into Calendar

I've got a custom post type called Events on my site with a custom field called event_date created via Advanced Custom fields that stores its value in yymmdd format. Everything works just fine and I'm ...
1
vote
0answers
94 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
64 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
92 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
322 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
580 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
386 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
86 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
170 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
38 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
93 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
31 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
671 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
91 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
341 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
180 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
67 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
523 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
71 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
116 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
473 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
341 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
8 views

get adjacent post by meta key and meta value

I'm trying to limit previous/next navigation to posts that have the same meta_value on a certain meta_key. I know this was asked before, but I couldn't pick a working answer. And all that I could come ...
0
votes
0answers
20 views

Using custom fields globally?

I'm trying to use the value of one custom field on multiple pages and posts. I'm a newbie to PHP and custom fields so what I'm trying to accomplish could possible be done using a different method. I ...
0
votes
0answers
15 views

Custom Field for Individual Pages in Multi-Page Post

I have articles divided into multiple pages using <!--nextpage-->. I need a custom field say mycf holding different value for each individual page of the article. Also, I need a way to update ...
0
votes
0answers
11 views

Select value don't stay selected after save

I did a multiple select item that takes his options from another CPT, it works but after the saving the selected items don't stay selected. this is my code for the meta box global $post; echo ...
0
votes
0answers
19 views

Why is my blog theme not showing page and post content, or their custom field values?

I have created a proprietary blog theme, with the following: 1 custom post type 1 custom taxonomy Taxonomy X has 2 terms. Each term has 4 and 7 posts respectively. Each post has 5 custom_fields. All ...
0
votes
0answers
13 views

Output terms based on custom fields

This question is rather specific. In my custom posttype "sak", I have a taxonomy called "vvpl". This taxonomy has a custom field called "revision" because a term have copies based on how many ...
0
votes
0answers
16 views

Permalink structure depending on custom field

I'm trying to create a permalink structure that is only used when a certain custom field is filled in. For instance, when the custom field value of 'premium' is '1', I want to add /premium/ to my ...
0
votes
0answers
21 views

Add nofollow to custom field link and make domain exceptions?

I have a theme that enables users to comment a post, and also to add a link inside a custom field. I've tried a few plugins to try to force a nofollow attribute, but none seem to affected the links ...
0
votes
0answers
10 views

Default custom column to off

Im currently building a plugin, that adds around 15 custom columns to a custom post type listing with meta data. When registering these columns they all default to being "on" in the screen options ...