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

learn more… | top users | synonyms (2)

0
votes
0answers
83 views

Using Post ID and Page ID in same function

I've written a function to display a custom sidebar, which is outputted as a sidebar. On some pages, I have a Custom Field called 'show_sidebar', which I can assign as 'false' on pages which I do not ...
0
votes
0answers
67 views

Query posts filter not working

I have created one custom post type which name is villa. In this post type I have added five post and assigned custom field values(mention bellow): Post Name Assigned Fields 1. Chalet ...
0
votes
0answers
18 views

How to add a box underneath the Post Box in Wordpress admin? [duplicate]

I'm wondering how to add a new box underneath the Post Box (Publish Box) in the admin section of WordPress? Am hoping to add a few custom field text inputs there.
0
votes
0answers
43 views

Wordpress - Shortcode or Merge tags

I want to use shortcode feature. The only issue is that, I am having multiple parameters. The code I have till now is : add_shortcode('lorem', array(&$this, 'lorem_function'), 10, 1); ...
0
votes
0answers
15 views

Check if there are posts with specific custom fields and then display only the custom field

Hope to find an answer or some directions in the following matter. I have a custom post type "listings" and for the listing entries I have set radio custom field called building (via wp-types ...
0
votes
0answers
99 views

How to add custom_fields value in JSON API using create_post

I want to add/update custom fields values using JSON API,anyone explain how we can specified custom_fields values in url for add or update.
0
votes
0answers
44 views

Extending select_post type in Custom Meta Boxes for WordPress (HumanMade fork) to store both ID and Post Title

I'm trying to figure out how exactly to extend one of the existing fields in CMB (HumanMade fork). I'm not terribly familiar with this process, so I'm looking for a suggestion of where to begin. The ...
0
votes
0answers
51 views

Archive Page - How to output a specific custom field instead of post content

I have several custom post types and I am using archive.php and it works fine, but now the client wants to replace the post content with a custom field called ingredients for the custom post type ...
0
votes
1answer
23 views

Changing order in which custom fields appear in dashboard

I have several custom fields for my CPT. In dashboard page of my CPT, when editing a CPT, I see my custom fields in "custom fields" box. But I want to change the order in which they are displayed. Is ...
0
votes
1answer
254 views

Order Custom post type loop by custom field (datepicker)

I know there are a lot of articles and documentation on this but I can't seem to figure it out. I have a custom post type 'agenda' wich is made for events. I want to sort this by the eventdate. For ...
0
votes
0answers
98 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
117 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
149 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
2answers
284 views

WP_Query get posts where post_name is empty

I want to get all the posts for which the post_name(slug) is not set/empty as well as a meta_key does not exist. $args = array ( 'post_type' => 'books', 'name' ...
0
votes
1answer
52 views

How to filter post using custom feild value in shortest and longest duration?

I am working on a video blog. On the front page I have a sort by option. You can try the option at the following link http://cricketclips.net/ Can't figure out how to make the shortest and longest ...
1
vote
0answers
73 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 - ...
0
votes
1answer
97 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
25 views

Apply comment to different post (not the current post) [duplicate]

I'm building a scrolling page website and on that page I have comment form and some posts from different categories. Comments applied to wrong post. Is there a way to choose the post I want ? ...
0
votes
1answer
95 views

Let Users Filter Posts by Custom Fields

I'm using the Advanced Custom Fields plugin to add custom fields to my posts, but was wondering what is the best way to go about creating a filter box for the user to filter through posts. I've ...
0
votes
1answer
93 views

Custom fields are not displaying in page with multiple loops

I have multiple loops on my home page. I am trying to display custom fields in each loop. But some of them are not showing. Any idea, why? Here is the code: //check for Featured Events here ...
0
votes
0answers
25 views

Why is a post different than a page with regard to custom fields?

I'm sure the flavor of this question has been beat to death, but why is it that I can add custom fields to pages and other custom page types, but when it comes to posts, the only info I find online is ...
0
votes
1answer
194 views

Can wp_insert_post_data filter be used to save custom field data?

I have custom field data that I would like to modify on its way to the database. wp_insert_post_data filter seems to be the closest thing I can find to achieving this. I dumped the $data and $postarr ...
1
vote
0answers
341 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 ...
0
votes
2answers
36 views

How to link a word comprised of a custom field with another?

I want to link content comprised of a custom field(field1_details) using another custom field(field2_link) which is a URL type. the_field('field1_details') is text_area field and ...
0
votes
0answers
55 views

Add class from custom field into widget class

How would I add a class coming from a custom field to a widget? I know I should put it somewhere into $before_widget ... in my case this is 'before_widget' => '<aside id="%1$s" class="widget ...
0
votes
1answer
35 views

Syling Custom Fields echo's from from functions.php

With the help of User Borek I've managed to get Custom Fields displaying on my siteby putting the below in the functions.php: function custom_field_before_content() { if(is_page() || is_single() || ...
0
votes
1answer
31 views

Custom Field select list is truncated

The site I'm working on has many custom fields being used in it's pages. For some reason though, the list of custom fields that you can pick from the dropdown only displays the first 30 field names. ...
0
votes
0answers
59 views

Display Category only if there are posts of custom type

I need to do a small modification on WP site done by someone else. And my WP experience is close to zero. But I'm comfortable with PHP. Wordpress Version: 3.8 Plugins: ONLY Advanced Custom Fields ...
0
votes
2answers
155 views

Register custom taxonomy from a Advenced custom field option page

I have a website with products (shoes), i have some shoes models registered as taxonomy on the function.php file like so: function add_custom_taxonomies() { register_taxonomy('mod-nike', ...
0
votes
1answer
45 views

Is it good practice to search for custom posts based on custom field values?

I am building a theme for a local roofing company and we need to implement a solution for users to be able to search through custom posts and find what they're looking for based on custom field ...
1
vote
3answers
976 views

Displaying Custom Fields on Post with Genesis Child Theme

I have tried everything to get Custom Fields to display on my posts using a Child Theme of the Genesis theme framework. I have tried to follow every tutorial I could find relating to it but still I ...
0
votes
1answer
360 views

Filtering Custom Post Type by Comparing Date and Two Meta Keys

I am probably just overlooking something here, but some pointers would be greatly appreciated. I am trying to create an event website using Wordpress and the Advanced Custom Fields plugin. Now the ...
0
votes
1answer
30 views

How to remove custom fields from the selector?

I want to remove some of those: So the user doesn't use them by mistake, Any idea howto? ( maybe looking into the wp database? )
0
votes
1answer
39 views

Meta query relation 'OR' not working as expected

I have the following query, $the_query = new WP_Query( $args );, which is supposed to show any properties of H_property_type bandb, hotel or dining. If I do a print_r of $args I get the following, ...
1
vote
3answers
401 views

How can I add a column/s to wp_posts table?

I am trying to sync WP with another service that offers an API that allows me to hook up their table's Update, Create, Delete to my sites. So when they create, update, or delete a row on their ...
2
votes
0answers
338 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 ...
0
votes
1answer
27 views

Custom post type with custom fields enabled, is there a way to set a default group of fileds?

I defined the custom postype: property, like this function register_cpt_property() { $labels = array( 'name' => _x( 'properties', 'property' ), 'singular_name' ...
0
votes
0answers
174 views

Sort Posts by custom fields inside a table

I am trying to build a table in each category pages where all the posts from the category will be displayed and make them sortable by custom fields value. I searched a lot about this and I am not sure ...
0
votes
1answer
86 views

Can I use a Custom Field as the Featured Image URL?

Each post of my blog has a Custom Field which is the URL of a photo on Flickr. How can I use it as the Featured Image? Please note I'm asking this question because I'm migrating to a theme that makes ...
0
votes
2answers
41 views

Storing/querying custom date data

I'm currently building a site where I need to filter/order/query a custom post type by date data. I can't use the post published date for this, but can't decide what would be the most efficient way to ...
0
votes
2answers
73 views

Bulk edit custom excerpt text in WordPress

Is there a way to bulk edit the custom excerpt text without going to each post and open it? When we have 300 posts it can be a very time consuming process.
1
vote
1answer
62 views

Can I use a Custom Meta Value inside of 'get_the_terms'?

I have a custom Page Template, and this is the code that I am trying to manipulate to change depending on a custom meta value that I write for specific Pages. $terms = get_the_terms($post->id, ...
0
votes
1answer
365 views

Matching Serialized Arrays with meta_query

I've asked a related question previously, but I think I've finally worked out the crux of my issue. I'm using Advanced Custom Fields and have a number of custom fields attached to my post type. I'm ...
-1
votes
1answer
52 views

Extract array from custom field

I'm using woocommerce product bundles extension. I need to manipulate some informations about bundled post. Actually I found the bundled product container has a hidden custom field named _bundled_ids ...
0
votes
0answers
96 views

Query Posts Via WordPress URL

I wanted to learn more about querying post types and their custom fields in WordPress. I've got two questions... I've followed this tutorial on Advanced Custom Fields and am trying to understand what ...
0
votes
0answers
397 views

Multiple Frontend Filters Using Advanced Custom Fields

I've got a series of custom post types set up, and a large amount of custom fields are linked to these post types via the Advanced Custom Fields plugin. I want to set up a series of checkboxes on the ...
0
votes
0answers
31 views

Custom field in title

I'm trying to change the posts with no titles to 'custom field' + 'mystring'. So far I got this code. add_filter( 'the_title', 'ta_modified_post_title'); function ...
0
votes
0answers
470 views

How to add fields to _wp_attachment_metadata?

I'm developing a custom metabox with the possibility to upload images and give the user the possibility of deciding whether those images are to be displayed on the front end or not, instead of having ...
0
votes
2answers
171 views

Send Multiple Custom Field Values Through the URL

Basically, I'm trying to follow this tutorial to add an action to the pre_get_posts and create a custom meta_query so I can alter the query within the URL and display babies,children and home books ...
0
votes
1answer
66 views

CSS conditional on custom field value

I am looking to add some CSS rules to an ID conditionally on the value of a custom field value. Specifically: add to id #firstimg the rules: opacity:0.4; filter:alpha(opacity=40); provided that ...