1
vote
2answers
45 views

Update meta values with AJAX

I am working on a voting system in Wordpress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, ...
0
votes
0answers
17 views

Save voting stats with Posts 2 Posts

I am working on a website where I make connections from posts to posts with the Wordpress Posts 2 Posts plugin. Now I want my website users can vote whether they think the 2 connected posts are a good ...
0
votes
2answers
33 views

Get attachment meta (I need attachment ID, unsure how to find it)

I've got the following example code, which creates a custom field and adds to the attachment meta: function be_attachment_field_credit( $form_fields, $post ) { ...
0
votes
0answers
18 views

Cannot save post meta data as Administrator in Wordpress

I have an wordpress installation at yogazoga.com with several custom post types. When i try to add meta data to posts through admin panel it simply does not work. See the post at: ...
0
votes
0answers
16 views

Template tag for custom field sub heading in post - error

Im trying to create a template tag for a subheading for a post which is entered as a custom field. This is the function I have: function spost_subheading() { $key = get_post_meta($post->ID, ...
0
votes
0answers
56 views

Show/Hide Custom Meta Boxes using any plugin

How can I show and hide the custom meta fields created using Advanced Custom Fields plugin? I want to handle the publish and unpublish of the fields and values from the admin panel. Is there any ...
0
votes
1answer
73 views

wordpress simple post multi rating with post_meta and user_meta

I am trying to create a multi criteria post rating function with simple form and post_meta and user meta. The Goal when users submits their ratings 2 things should happen: 1.the ratings is stored ...
0
votes
0answers
86 views

Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete

I am trying to write a plugin that adds a custom meta field to image attachments to give images a credit field. I use the 'attachment_fields_to_edit' and 'attachment_fields_to_save' filters. ...
0
votes
1answer
47 views

If custom field doesn't exist, or exists and it's true show title?

Im trying to add new feature to the theme and that's show/hide page title,but since i already have about 50 posts i can't go to all of them and save again just to save custom field values. So i tried ...
0
votes
1answer
116 views

Adding custom fields (post meta) before/during wp_insert_post()

Our code base has a ton of logic that executes as the post is inserted/created. However, some of that logic depends on custom post meta. The only way I know of to add post meta to a new post is like ...
0
votes
3answers
74 views

Order by a meta fiel in query loop

I would like to sort my article from a category by a number added in a meta field. Here is the first step, I get the articles to display on the page. <?php $cat = get_post_meta( get_the_ID(), ...
0
votes
0answers
24 views

wp_postmeta are updated for only one page

Code below only updates wp_postmeta of one specific post, not all the posts. On other pages the meta_key is not even added to the table, so it is not the problem with saving but with something else, ...
0
votes
1answer
49 views

delete_post_meta() for whole CPT / multiple posts?

I'm cleaning up a theme and one of Custom Post Types has some odd, long gone custom fields. I want to delete them, unfortunately delete_post_meta() takes post->ID for an argument, while I want to ...
0
votes
1answer
44 views

Meta box values are displayed on Custom Fields list. Is it possible to hide them?

I have multiple meta boxes for my Custom Post Type posts. I want my users to add new fields using Custom Fields. The problem is - Custom Fields display all the garbage from my metaboxes and it might ...
0
votes
3answers
171 views

shortcode in a custom metabox

I am trying to add a shortcode from a plugin to my custom metabox. I have read it isn't the done thing but in this case i do need it to work. The client might not add a video but might add an image ...
0
votes
1answer
159 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
1answer
192 views

Gravity Forms Update post meta from template

I created a form called 'Books' which has the fields: Title (Post Title) Author Genre (Dropdown - fantasy, horror, drama... etc) ISBN Number Status (Dropdown - Default Option - Published, additional ...
0
votes
1answer
45 views

how to show this part only in the single post page?

I have this part in my index-meta.php file : <ul> <li class="Source"><a>source:</a></li> ...
0
votes
0answers
38 views

Gravity product fields to custom post type

I tried using Gravity Forms + Custom Post Types (http://wordpress.org/plugins/gravity-forms-custom-post-types/) to add a product field as an array into a metabox of a custom post type, but the option ...
0
votes
1answer
138 views

Any way to update_post_meta with html content? It gets stripped and becomes empty

So I am cloning some divs created from an array using jQuery. Here is an example. I have a drop down list that contains items to add to the meta box. The add button clones a hidden div based on the ...
0
votes
0answers
82 views

Custom Field: Display only if a specific key is selected outside the loop

I might be doing this all wrong. I have a custom field called "enable_adsense" and the value can be either "yes" or "no" What I'm trying to do is display something if the value is "yes" and something ...
0
votes
1answer
85 views

How to get specific post meta by title or id

I have register bellow custom post type in function.php and I am using Advanced Custom Fields. Using advance custom field type I have added one image field and assigned to my Release custom post type. ...
1
vote
1answer
457 views

Create Multiple File Upload Metabox in Wordpress

I am trying to create a metabox to upload multiple files (can be images or files). Currently I have the upload field and its working file till the time we press upload and saving the data. The only ...
0
votes
1answer
121 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
0answers
70 views

Is it ok to delete empty meta values

I'm using database peek http://wordpress.org/plugins/database-peek/ to show my database structure and have noticed that wp_postmeta has 95073 rows in it. I noticed that a large part of them have ...
0
votes
1answer
171 views

Build Array from Input Fields question

I have a series of input fields sets: <input type="text" name="people[name]" /> <input type="text" name="people[lastname]" /> <input type="text" name="people[email]" /> <input ...
0
votes
0answers
113 views

Repeating Posts Plugin Tweak

I am attempting to Repeat Posts (ie. publishing them multiple times) and found the plugin repeating-posts. However, I need to tweak it so that when I have it scheduled to repeat, it also repeats the ...
0
votes
1answer
166 views

saving/reading custom field value does not work - no value gets POSTed

I am trying to add a custom field to all my posts and of course saving/reading the value. As a starting point I took the example from the Wordpress Codex and stripped it down to bare bones. I know it ...
0
votes
1answer
71 views

Search CPT Title AND Meta

I currently have a CPT I would like to search, the catch is I also need to be able to search the meta data for the CPT. I have the following code that currently searches the meta value needed but I ...
0
votes
1answer
459 views

Custom fields to save multiple values

I’m adding custom meta-box, by means of jquery I can create in it several custom fields with a key “test”. There can be one or several custom fields, but the key is only “test”. I can also delete key ...
0
votes
0answers
48 views

Unsetting/Removing custom meta data on a page

I've made a custom meta box where you can upload an image attached to the post. I've done this since the image isn't placed in the normal content area but separate. /*** Custom post upload ***/ ...
0
votes
2answers
95 views

How can I show custom field according to taxonomy?

How I can show custom fields in my theme according to category? For example in Laptop category show some custom fields and in Motherboard category show another fields.
0
votes
0answers
377 views

How to upload images as custom field with meta box?

With this sample of code I want to demonstrate that, my meta boxes are working well, entering data into database (postmeta) with the post, except the image files. They are passing the filenames only ...
1
vote
1answer
284 views

Combine multiple custom field values into single value

I'm sure this is a fairly basic question but I can't seem to get it right. I have multiple custom field values for addresses in my custom post type and I want to save them as a single value or array ...
0
votes
1answer
224 views

Move Title and the Content WYSIWYG editor position

Right now, the Title is the first thing at the top of the page, then we have next the WYSIWYG Editor. I would like to add a Custom Meta Box and insert it before the title or WYSIWYG editor. How can ...
1
vote
1answer
45 views

How can I sort homepage by a meta value?

I am trying to sort my home page posts by a custom meta value. I've been told I should use pre_get_posts but I seem to not be implementing it correctly. This is what I am doing: ...
0
votes
0answers
79 views

How to create a custom field index page

I'm trying to create an index page for some custom fields, just like the taxonomy search pages. E.g. I have a custom field with slug=wpcf-delivery. I want an index page that lists all values where ...
0
votes
1answer
97 views

How to validate select field in post meta?

I want to display a select dropdown field in the post meta. How can I validate the input before saving it? Currently, I am simply saving without validating like this: if ( isset( ...
0
votes
1answer
503 views

filtering custom post types via meta data drop down

I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
0
votes
2answers
749 views

Up/Down voting system for Wordpress

Looking in all posts with keywords "voting system, upvote, downvote", I can't find a satisfying solution for this issue, except accepting one of the available plugins, spend a lot of time undersanding ...
0
votes
1answer
148 views

Modify custom field from front end

If I need to manage a custom field under wordpress, but not from the admin area. In other words, I need that users modify the content of post custom fields from front end. What is the way to do so? ...
1
vote
0answers
351 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 ...
2
votes
1answer
347 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
2
votes
0answers
219 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 ...
0
votes
1answer
737 views

Custom query with category exclusion and post-meta “whitelist”

I have two widgets, one shows News while the other shows everything except News (We'll call the second one Blog). The blog portion is currently working correctly. The News posts are either ...
0
votes
0answers
166 views

Wordpress custom field being lost on wp_update_post, with a twist

I'm using wp_update_post to programmatically add a title and tags to posts from the front end. I'm running into a hair-tearing issue with custom fields in the process: one of the two custom fields ...
0
votes
1answer
173 views

Display meta data from a custom field within plugin Category Grid View Gallery

I am using this plugin, which creates a gallery of posts, fetching a thumbnail and the titles of the posts displayed in it. I have enabled Custom Fields, and have created (and filled in values) a ...
1
vote
1answer
55 views

Get specific custom field keys from a post and put into an array

I have the following code to look up the longitude and latitude based off of a custom field upon saving the post. My address fields (street_1, city and state) are separate. I have searched and thought ...
0
votes
2answers
53 views

Best way to achieve multiple links in a post title

Usually I would get a post title no problem, however now I need to achieve something like this: The Example is written for this title As you can see two words are links in the title, another ...
2
votes
3answers
43 views

Custom fields: In what order are they saved into the DB?

If I insert multiple custom fields to my article, they get sorted in "I don't know what" way. So when I insert some multiple fields in an article and call those via $cf = get_post_custom(); foreach ...