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

learn more… | top users | synonyms (2)

0
votes
1answer
857 views

Order custom posts by taxonomy, then by meta_key

I've created a custom post type called Player Manager, where I have all the players of a football team. The CPT has four different categories - goalkeepers, defenders, midfielders and strikers. I also ...
4
votes
2answers
5k views

How to validate custom fields in custom post type?

I wrote a plugin that creates a custom post type with custom fields. To prevent users from entering incorrect information, how can I validate the data? I assumed that the save_post hook function ...
4
votes
1answer
302 views

Storing meta fields multiple times OR once with multi dimensional array?

I got some options that I expand using a repeater type field. The values I save for each field is already an array so in essence I'm saving a multi dimentional array per option. (See this weekly ...
0
votes
1answer
2k views

How do I insert a custom field in a user submitted post?

Please help! I have a form for users to submit posts, and I want them to be able to choose photos already in the media gallery based on category selected. I want to include radio buttons to choose ...
1
vote
1answer
703 views

Add Paypal Button programmatically

I've setup a post type-Product with custom fields containing price and other attributes. I'm reading Paypal Documentation right now, What i've read till now is "HTML-Buttons" can be pasted from ...
0
votes
1answer
95 views

How to change order of posts in admin

Hi I have set a custom post type with some custom fields, one of the custom fields is a date field which is different from the publish date of the post itself, which is by default used by WordPress to ...
1
vote
2answers
133 views

Plugin for custom posts and fields [closed]

I need a plugin to do the following: Add custom posttypes such as "Books" or "Cars" Add custom fields such as "Url", "Label", "Number of wheels", "Name of passenger" or "Age of passenger" There ...
1
vote
1answer
58 views

Delete custom fields when deleting posts

When I delete a bunch of posts their custom fields remain in the database, is there a way to remove them as well on deletion?
1
vote
1answer
400 views

search also in taxonomy, tags and custom fields

I have found many answers separately for Taxonomy, Custom fields and Tags, most of them outdated. But how to combine a search in: - designed custom fields of a custom post - custom taxonomy terms - ...
-1
votes
1answer
113 views

How to automatically create a custom field when a post is published?

I'm trying to add custom fields on post publish with this code which I added to my functions.php : add_action('publish_page', 'add_custom_field_automatically'); add_action('publish_post'. ...
1
vote
1answer
93 views

Limits, not all post are showen when querying for posts by view count

I'm having some difficulty getting a loop that gives me post by most viewed. I started by following this tutorial ...
3
votes
2answers
445 views

How to set a default meta value for custom field

I have setup a custom meta_key for attachments. Since it is a radio button with Yes/No options, and the default value is always Yes, I need that this default value is saved into the db when the ...
0
votes
1answer
250 views

Display newest post's custom field content on homepage, daily

Ok, so I'm pretty confident on how to display a certain post's custom field content on my home page, or wherever I wanted it. But what I'm trying to do is this: I have my main home page that I want to ...
0
votes
1answer
646 views

Copy/clone/associate Custom field to Custom Taxonomy

I'm looking for a solution to "clone or copy or associate" custom fields data to custom taxonomies. example: Custom field "location" should copy data of that posts custom field to Custom Taxonomy ...
0
votes
1answer
98 views

Use Metabox to enter Post Title

I would like to use a custom meta box to build the UI for the post title, instead of the usual field 'title' supplied on WordPress post screens. I've build the meta box, the question is now how to ...
0
votes
1answer
76 views

How to store meta field values

I would like to store a few extra details for my custom post type, using meta boxes. Should I store all the values under one meta key in an array, or create several meta key and value pairs?
0
votes
5answers
3k views

Preserving line breaks when saving and displaying custom fields data

I'm collecting data via a form plugin and save that data in form of a post with several custom fields. I then display the content of the post and the custom fields on my post template via <?php ...
0
votes
1answer
25 views

Creating entries with image attachements within posts and managing them in a list

I need help with choosing a suitable meta box or other means for listing, adding and sorting entries, relevant to the containing post. For each entry it should be possible to attach a set of images, ...
0
votes
1answer
684 views

Changed PHP handler to DSO - weird custom fields problem [closed]

I have a problem for my website. The homepage lists articles (external links) that are put in categories and that also mention the article source (website where the article is published). These ...
0
votes
1answer
209 views

Parse Shortcodes in Theme's Custom Field?

I have a theme which has a "PRICE" custom field that only accepts numerical values. Is there anyway to parse shortcodes in that custom field so I can dynamically display the price using another ...
0
votes
1answer
879 views

How to sort by custom field value?

I am using these code to sort most Commented, Most viewed Posts <?php $params = $_GET; unset($params['orderby']); unset($params['order']); unset($params['v_orderby']); unset($params['v_sortby']); ...
1
vote
0answers
380 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 ...
3
votes
1answer
1k views

Adding meta values to permalink

I have publications and I want to simply add year and month to the permalink. Currently the year and month of publication is added to the post as a meta value. I've set up publications as a custom ...
1
vote
0answers
72 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' => ...
0
votes
2answers
333 views

Vimeo thumbnails

I use Advanced Custom Fields to show Vimeo videoes on a site I am creating for a client - The client pastes the vimeo ID (the last letters in the url) in a field, and the video is shown. But I would ...
0
votes
1answer
80 views

I want to understand plugin implementation of custom posts / taxonomies / metaboxes

I want to find a long-term GUI/plugin-based solution to working with custom posts types, custom taxonomies, and custom fields/metaboxes. To this end I have been reviewing all the major custom ...
0
votes
1answer
695 views

Adding a Custom Field to be used by Posts 2 Posts

I'm trying using Gravity Forms and allow for a user to submit a post to my CPT, and choose an optional Connected Post Type. I have two CPTs, CPT1 and CPT2. When they're viewing my form for creating ...
1
vote
0answers
236 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 ...
3
votes
2answers
329 views

Trying to perform complex custom field query with order by set to field value

I've got two custom fields for event posts: event-start and event-end. When I'm querying for current events, I'd like to show any post where the event-start OR the event-end is greater than or equal ...
3
votes
2answers
5k views

Add a checkbox to post screen that adds a class to the title

I'm needing some posts to have different title colors than others, and I figured this would be most conveniently accomplished by some sort of check box on the post creation/edit screen. How would I go ...
0
votes
1answer
256 views

Display custom field value as a mailto: link

I'm very confused with an "Email" custom field, how I can make it automatically clickable as "mailto:" link, inside a loop like this: while ( $loop->have_posts() ) : $loop->the_post(); ...
0
votes
1answer
353 views

How to rate a post from Admin Side / Manually?

I am working on a Mini Job Site. i want to give rating to posts manually from admin / editor side Best rated people will be on top. so visitor'll get better choice. visitor are not allowed to ...
0
votes
2answers
384 views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will ...
0
votes
2answers
935 views

Get single image from custom fields made with WCK custom fields creator

I used WCK Custom Fields Creator to create a repeatable custom field for uploading pairs of images (one color, one black and white) to posts. So for example, one post may have three fields, with two ...
0
votes
2answers
682 views

Meta Box Plugin Cloned Fields - Multiple Foreach values

I have the following code that I can't get working. I have two cloneable fields that are being output as one entity (URL and thumbnail image). These are cloned fields using the Meta Box Plugin by ...
4
votes
3answers
990 views

Sort posts by custom field numeric value using dropdown

I've read umpteen answers and questions about things that are very similar to this but I just can't get it to work for my specific situation. I have some posts with a category of "property". In ...
0
votes
1answer
601 views

Getting the Featured image URL and inserting it as Custom Field on Post update / publish

I've tried a number of solutions posted here regarding converting custom fields to featured images - of course in reverse; but non seem to work for me. What I'm trying to do is grab the Featured ...
0
votes
1answer
93 views

Basics: adding template tag to display custom fields in the post

I've just started learning so this might be a noob question. Displaying Custom Fields With a Custom Field added to the post, it's time to display your books and mood to the world. To ...
0
votes
1answer
207 views

Ordering by 'Title' OR 'Custom Field'

I have an issue here that I just can't wrap my head around. Let me jump right into it: Basically I have a site that has 4 order options; -Name Ascending -Name Descending -Price Ascending -Price ...
1
vote
2answers
184 views

Exclude images uploaded via meta boxes from Wordpress gallery

I am using the following simple get attachment code to display all images attached to a certain post but I want to be able to exclude the images uploaded via a couple of custom meta boxes that are ...
0
votes
1answer
136 views

Types plugin isn't compatible with my custom post type

I have a website with a few custom post types. I have also installed Types plugin so I can use a custom field to upload/display images on the home page of the website. I've found that the code seems ...
0
votes
1answer
351 views

How to Create a Frontend Html-list Editable in the Backend?

I would like to add a feature to a page to display a short list of people, like the one seen here. I have done this on other sites by styling lists with css. This time however, it's for a client and ...
2
votes
1answer
41 views

How do I query for a post by custom field?

I have a custom field called "song-id" and I'd like to lookup a post by a song-id value. Can someone give me the code snippet for it? (bonus: also looking for a code to use the permalink in the post ...
1
vote
1answer
415 views

Saving value of a selection option in comment form as comment meta

In a plugin that I am writing I need to let user choose an option from a dropdown list before they post a comment. I used the comment_form action and inserted a drop down into the comment form. /** ...
0
votes
2answers
124 views

Build index page from custom fields

Im starting to delve deeper into Wordpress custom fields and wanting to replicate this page in Wordpress: http://www.clubsact.com.au/corporate/index.php So my site is not tightly structured to a ...
0
votes
2answers
1k views

How can I add/update post meta in a admin menu page?

I wanted to create a plugin to batch manage posts' custom field data. I know I can add post meta by add a meta box in post edit screen and use add_action('save_post','function_to_update_meta') to ...
2
votes
1answer
876 views

Use ajax to update_post_meta

2 days ago I asked this then I tried to work on my code to be able to understand how ajax and php work and now I have a new issue that, probably would be easily solved. These are my codes: <?php ...
1
vote
2answers
560 views

Force hide custom field metaboxes

How can I completely remove the custom fields and the collapse button in the Edit Post/Edit Page custom screen, but without removing the capability to add custom fields with a PHP function?
0
votes
1answer
881 views

Custom Field values not Showing in Edit Page of Custom Post Type

Custom Field values not are not showing in respective fields while i click the "edit" button .. they just show blank as we are creating a new post.I am able to save the values in custom field while ...
0
votes
1answer
46 views

Bypassing a Form Options

here is the situation. I am using a plugin and although it is (half) works, I can't access the setting page. The plugin is to fetch thumbnail from Youtube and other video sites, but the problem is, I ...