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

learn more… | top users | synonyms (2)

-1
votes
1answer
107 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
78 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
335 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
231 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
489 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
74 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
4answers
2k 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
24 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
518 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
188 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
733 views

Dynamically Add Custom Fields in Posts

I'm building a resume website and I would like to manage the data in custom fields. For examples I would have multiple meta boxes: Education, Work and Competencies In Work I can have multiple ...
0
votes
1answer
753 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
337 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 ...
2
votes
2answers
705 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
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' => ...
0
votes
1answer
271 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
77 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
525 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
174 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 ...
2
votes
2answers
264 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 ...
2
votes
2answers
3k 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
204 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
245 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 ...
1
vote
2answers
332 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
1answer
580 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
502 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
665 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
523 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
82 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
192 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
159 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
110 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
297 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
39 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
334 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
118 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
855 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
684 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
1answer
392 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
635 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
44 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 ...
0
votes
1answer
2k views

Order by custom field date with ASC order

I've found several similar question but none of them explains why the below is giving me nothing with ASC order. It works with DESC. Basically it's a query that should list posts where the custom ...
0
votes
1answer
50 views

Custom field only on custom post type?

I have added some fields to a custom post type through function add_electric_portfolio_box() { add_meta_box( "electric_portfolio_info", __('Detalles de la web'), ...
0
votes
1answer
709 views

Front-end update_post_meta with ajax

as written in title I'm trying to update a post_meta using Ajax. Actually I'm a complete newbie to Ajax and how it works so, if it is possible, I would appreciate if someone could 'take me by hand' ...
1
vote
2answers
216 views

Custom fields attached to a page template only show on edit screen when page is saved

When I create a custom field and associate it to a custom page template, it doesn't show in the post editor screen until I click save (draft / publish). Ideally, the custom field should show when I ...
0
votes
1answer
174 views

Adding class to last list item? Not WP generated

this one has been getting me for a while. At the moment I have a repeater field with Advanced Custom Fields: <ul id="servicelist" class="clearfix"> <?php if(get_field('homepage_service')): ...
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 ...
2
votes
1answer
166 views

Sort by posts that have a featured image?

I'd like to sort posts on the index page to show those that have a featured image first. I've done this in functions.php: add_filter( 'pre_get_posts', 'my_get_posts' ); function ...
1
vote
0answers
470 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' => ...