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

learn more… | top users | synonyms (2)

2
votes
2answers
639 views

How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?

I know the question is quite ambiguous. Let me explain: I have a page that lists all posts with a certain value of a custom field. (Eg.: The page Rentals lists all posts with the value rental of ...
0
votes
1answer
10 views

Types Plugin - Display options(select) in template

I have created a custom "select field" in admin panel using types plugin. Is it possible to get the values and use it somewhere outside the plugin(in theme or in another plugin)? I like to update the ...
0
votes
2answers
512 views

How to exclude custom fields from search queries?

I'm building a hotel search engine and I've first created a custom content type "hotel" with Types & Views Toolset. I'm using "Search everything" plugin to query custom fields and custom taxonomy ...
0
votes
1answer
519 views

How can I output the custom fields wrapping with HTML

I am trying to publish custom fields created using the plugin "Advanced Custom fields". I am able to display them on posts and custom post types as raw output. But I want to wrap html around the ...
1
vote
2answers
97 views
+50

Plugin not saving values when placed in a folder within /wp-content/plugins

Ive got the following code for a WordPRess plugin that essentially add two custom inputs on each page/post edit screen. The values are then saved and output in the header of the frontend page. The ...
1
vote
1answer
718 views

Auto Populate Custom Field with Complex Value That Increase by One?

Can somebody help me to sort this? I am using WP 3.5.2 and I have "Orders" post type where purchase_order custom field is located. This is the sample of purchase order record: POCOS20130051 PO - ...
0
votes
0answers
11 views

Create new table vs post_meta table database dilemma

I'm working on custom function that will store post data but I dont know which method to use. I have meta box in edit post area that will store diferent videos (embed code) for each post will have ...
0
votes
0answers
15 views

Create custom field on post from the content

Hello i want to add posts form cvs but i need a custom field for the items marked with red in the image please tell me how to do it
2
votes
1answer
42 views

How do I set the default admin sort order for a custom post type to a custom column?

SOLUTION AVAILABLE HERE I've set up a custom post type called clientarea, and set up several custom columns for it in the admin area - the custom columns are all custom meta fields, as you can see ...
0
votes
1answer
16 views

Create custom query for search?

I have create search box using ajax.If i enter any value in search input box that this value search in post title or post meta data and get all data of this value in custom post type.also query check ...
0
votes
0answers
14 views

Change post template the proper way

I'm trying to create an option on edit posts screen (backend) to select different post template based the selection and I need your opinions guys if that is the proper way. Here is what I've tried so ...
0
votes
1answer
12 views

How to load script conditionally on custom field in wp_postmeta?

I'm trying to tidy up some of the code that has been doing its job for quite a while. Specifically, I used to load scripts in header.php and I'm trying to move that into functions.php. One of the ...
0
votes
0answers
9 views

Add Custom Fields to Tags

I have been searching how to add custom fields to taxonomies, but all what I found (that works) is how to add custom fields to category (below is my code), but I dont know how to edit it to add custom ...
1
vote
1answer
16 views

How can i make WP_Query return post image and categories?

I have a sidebar widget that will display related posts based on a custom meta field. The query works, but its very wasteful. All i need is the post title, featured image and the categories of the ...
0
votes
1answer
525 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
0
votes
2answers
30 views

Get categories query not working in function.php

I am trying to get the categories of my custom post type in functions.php But it not return any value, when i run this query in any theme file it work fine. Here is my code function ...
0
votes
0answers
15 views

Adding keyword to meta key search

With the help of some users on Stack Exchange, I've built a custom faceted search which searches quite a large list of custom fields using drop down selectors. I'm having difficulty adding a keyword ...
0
votes
0answers
8 views

How To Add Custom Meta Field Select/Radio Box to Post List Bulk Edit Mode

How can you add a radio fieldset to a custom post-types post list bulk edit screen for a custom meta field? Please provide in depth code example and explanation and thanks in advance. The ...
1
vote
2answers
1k views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...
1
vote
1answer
891 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 ...
0
votes
0answers
10 views

Order Custom Post Type by Custom Field - Genesis

I have created my own custom post type and taxonomies with Custom Post Type UI plugin. With Advanced Custom Fields plugin I create custom fields for my Custom Post Type. I'm using WP All Import to ...
2
votes
3answers
513 views

Title and post URL based on custom fields?

I have custom fields in my custom post type. They should serve as a title and post slug for URL. Basically, whenever I change the content of the custom fields, the title field should react ...
0
votes
1answer
354 views

Show Posts in Vertical Tabs with Scrollbar

I have created CPT ( Custom Post Type ) called Recipes. I want to display all me recipe in Vertical Tabs. For Example; check the image below i have created. Image Example Click Here On the left ...
0
votes
0answers
4 views

custom field suite : relationship filter by category

i'm working on a wordpress site where the Custom field suite plugin is already installed : http://customfieldsuite.com/ The plugin allow the admin to create a relationship field : ...
0
votes
1answer
10 views

Add Image With Changeable Link in Custom Field [on hold]

In my WordPress site, I want A image with changeable link in bottom of every post. The Image will be fixed but links should be changeable. I want This changeable link option in the post editor of ...
0
votes
4answers
90 views

Cannot Hide Google Map if custom field is blank

I am using the following to display google maps using hotel_address custom field. <iframe width="440" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" ...
0
votes
3answers
1k views

Saving Custom Post types and fields to a custom table

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be ...
0
votes
1answer
491 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
0answers
29 views

Update Custom Fields once post's modified

I have a particular custom post type, called person, and want to display them on a Faculty page. There is a particular order I would like these people displayed on the page, and don't want them ...
0
votes
1answer
21 views

get_field() in Advanced Custom Fields retrieves bool(false) [closed]

I have a background image, which has to be adjusted in every post. Therefore the ACF plugin. But whenever i try to query the custom field by get_field('bg-size',$post->ID) , ...
0
votes
0answers
5 views

Wordpress - Pagination post, order by: meta_key only from current category

I trying to make a pagination links from my website. Schema: Serie | (category) |_ Temporada 1 (taxonomy: temporada) |_ Episodio 1 (posts 1 - meta_key: numeroepisodio) ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
0answers
16 views

How to order post by custom fields count

Situation: I have a custom post type with a Relational Field (I'm using ACF Pro) which links these posts to another custom post type. I use the first type to let the users upload their pictures of ...
0
votes
1answer
51 views

How to show posts rank based on custom field value

I have total 100 posts, 10 posts in each page on homepage with paginatin. Here is my code $args = [ 'posts_per_page' => 100, 'fields' => 'ids', // Add additional args here ]; ...
0
votes
0answers
9 views

Best way to filter posts being displayed on the fly

I got the following post structure: The search box is to illustrate what I want to achieve. CPT Videos: Videos being displayed in the image. CPT Artistas: Another post type for the artists. ...
0
votes
2answers
1k 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
1answer
394 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
1
vote
3answers
6k views

User Profile / Add Custom Fields

Hello: I am trying to add 7 custom fields to the standard Wordpress wp-admin/profile.php page. There are a few site which suggest a simple bit of code to do this, for example: ...
0
votes
2answers
918 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
0
votes
1answer
25 views

Custom field, add class to anchor tag

I'm trying to add a class to an anchor tag within a custom field. Like: <div class="custom-field-class"><a href="http://someurl.com" class="some-class">Awesome</a></div> ...
0
votes
1answer
445 views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
3
votes
1answer
347 views

Change post format using custom field

I'm creating a theme using the CF Post Formats plugin. But I've run into some trouble I don't know how to solve. Here's what I want to be able to do: Create a new standard-format post Enter a url ...
0
votes
2answers
36 views

Display custom field value part by part?

I have custom field in posts called hex_colors which contains hex color codes separated with white space, custom field value is like this: "000000 f0f0f0 c0c0c0 202020 404040 " I can change ...
0
votes
0answers
16 views

Show content if deadline is passed

I am using Date Custom Field in a scholarships information website and using this code to get scholarship deadline. I just want to show two words "Applications closed" if the application date has been ...
4
votes
2answers
778 views

compare meta_query in get_posts arguments

I like to exclude certain posts with a custom field. So if my_custom_field_ignore isset AND 1 ignore this post. If it's not set include it. This is what I have $args = array( 'post_type' ...
0
votes
1answer
13 views

How to enable the user to add value through the admin panel?

please help me! I have custom posts type 'gallery'. In my custom post type i have custom fields. I added them through the file functions.php. How to enable the user to add value through the admin ...
0
votes
2answers
429 views

How do I exclude posts by custom field value?

I need to exclude posts that have a custom field 'city' value of 'Melbourne'. After much searching I think the solution might consist of 2 parts. In functions.php : A function to get the post IDs ...
0
votes
0answers
6 views

Utilizing 'link format' in WordPress without losing SEO value?

In many WordPress themes that support formats, applying the link format to a post makes its title point to a URL (examples can be found: Daring Fireball and MacSparky). In the theme I'm using, the ...
4
votes
1answer
2k views

How to order adjacent posts (prev / next) by custom field value?

I am using the More Fields and More Types plugins to create a custom post type called product. This custom type is based on the Post type. One of the fields is named lot which is an integer ...
0
votes
0answers
45 views

Get month and day from a Date Picker custom field

I've got a custom field called fecha_del_evento from which I want to obtain the day and the month in different formats; day in numbers, and month with the 3 first letters. The code I'm using is a ...