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

learn more… | top users | synonyms (2)

0
votes
2answers
119 views

Settings API - save multiple tabs at once

In the attached screenshot you can see the structure of the theme options we are working with. There are 8 tabs and for each tab, we have created custom fields using code similar to what can be seen ...
0
votes
2answers
84 views

Custom fields won't display on my blog page

I created a custom field called 'Page Description' which I use to create a custom title for each static page of my wordpress site. I use the code: <?php echo get_post_meta(get_the_ID(),'Page ...
0
votes
0answers
36 views

How to Use Theme Customizer settings for Colors in a Custom Theme?

I've been reading up on the Theme Customizer so I can create a backed for the Custom theme I am building. Based on the tutorials I have read, I understand how to enable the customizer, create new ...
-1
votes
1answer
61 views

jaredatch metaboxes on video post formats

I'm trying to get a metabox to show up only when the video post formats is selected using jaredatch metaboxes ...
0
votes
1answer
46 views

Custom field Search with Relavanssi

The site I'm working on is a talent website that has actors names, headshots, and resume all created with post_title, featured images, and custom fields. I am using Relavanssi to make my search ...
0
votes
0answers
17 views

Sidebar IF query hiding everything

I have this query which I'm using in the sidebar, but when I place it in a php widget, the whole sidebar disappears... The code is below and the full sidebar code is in a pastebin here ...
3
votes
1answer
53 views

How to use multiple query with same meta key

I use these codes to print custom field query. My custom field key is out_wiki <?php if( get_post_meta($post->ID, "out_wiki", true) ): ?> <div class="outlink"> ...
0
votes
1answer
9 views

Collect Data from NEXT item while in loop

I am trying to get the value of a custom field. The trick? I'm in the loop, currently printing out 2 of 5 for this example. I would like to get some info from 3 of 5 (or even 1 of 5) while printing ...
1
vote
3answers
77 views

Change content before writing to database

I've searched around but I can't quite pin down the answer for this. I am attempting to use the content of a custom field as post_data and save it to the database as such when a post is created or ...
0
votes
0answers
69 views

Admin Filter by custom field

I use this for make a filter for post in my admin, on a specific custom post type, but it don't work, the query don't update and i get an empty list add_action( 'pre_get_posts', ...
0
votes
1answer
114 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 ...
0
votes
0answers
63 views

Adding Custom field in a signup form not working

I have used the following code in functions.php to add some custom field to my registration form and add it to the db in the wp_usermeta table. But dont know why it is not working. I am using a custom ...
0
votes
0answers
20 views

How make a link to meta_key for all meta_value

I have a meta_key = 'company', where meta_value = name of the company that introduces the user to order form. Then these companies appear on the publication page (index-job.php). How make a link the ...
0
votes
0answers
14 views

Altering query to return more data

I am building a web app with WordPress. I have a situation where every time I do a while ($query->have_posts()), I immediately do a get_field('due_date'). I'm using advanced custom fields. This ...
0
votes
1answer
132 views

Upcoming Event: How do I sort database by custom date field, but ignore past dates?

I am using an events plugin and struggling to get my database query to be perfect. The query is on the event-single.php template. What I need the query to do: Query the "events" custom post type ...
0
votes
1answer
44 views

Order custom fields alphabetically

I've been trying to order the custom fields alphabetically, but I can't get the ordered list I want... this is the code I'm using: <?php $vMarca = get_field('tienda_marcas' , false, ...
1
vote
1answer
44 views

Migrating old posts to new wp, how to extrapolate infos from the post body to custom fields?

I need to migrate some information that are store in the post body (like "price:200$"), extrapolate them somehow and put them into custom fields. how do I do that? The blog is about restaurants and ...
0
votes
0answers
79 views

Combine Two Plugins to Filter by Custom Taxonomy and Custom Field

I'd like to give my users the possibility to filter the posts by Categories, Tags, and Custom Field values. Search/filter form would be multiple fields: Field One City:[categories with a parent ...
1
vote
2answers
71 views

List upcoming events, ordered by date in a custom field

I want to display a list of events with dates in upcoming order. Ex: 23 March, 2013, 30 March, 2013 Below is the query I'm using to filter out posts from my database: query_posts( ...
0
votes
1answer
47 views

Calling a custom profile field only it it exists

I've used this code to show custom fields if they're filled in a post using Custom Field Suite Plugin <?php if($cfs->get('whatliked')){?> <?php echo $cfs->get('whatliked'); ?> ...
1
vote
2answers
75 views

How to remove slug metabox from custom post type's page?

I just discovered a new meta field on the newly created custom post type page. The meta name is slug, and it's under the wp editor field. What's that, and how can I remove it?
0
votes
0answers
70 views

How to display custom post types by custom taxonomy in while loop?

I am using Posts 2 Posts to display a custom post type on a page. Document status, document author and feedback due date are custom fields. Package is a custom taxonomy. I want to display my custom ...
0
votes
1answer
61 views

Retrieving custom field value with get_post?

There's no mention of custom fields values in Get_post's codex page. Is it impossible to use get_post to get a custom field value of some post, and if so, is it necessary to perform a whole loop just ...
2
votes
1answer
190 views

Formatting custom meta box date from YYYY/MM/DD to a more readable alternative

QUESTION This is following a previous question that was graciously answered by Milo earlier here - How to sort CPT by custom meta value (date), and return posts month by month In short, I'm having ...
0
votes
1answer
37 views

Add a class to post_class if more than one post shares same meta_value_num

I would like to be able to add a class such as .samedate to posts that share the same meta_value_num from a custom meta box. So for example: Say two posts share the same custom meta box value for a ...
0
votes
2answers
59 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
45 views

Sorting posts by custom field value in array

I have a custom field value that is an array and it has date as one of the values: a:3:{s:4:"date";s:10:"03/06/2013";s:6:"target";d:1000;s:8:"currency";s:3:"USD";} I'm trying to sort posts with ...
0
votes
1answer
51 views

Display Custom Field in Sidebar if Value is Present

I'm trying to use 'if' 'else' to display a link button if I have a value in the 'TourURL' custom field, and if not, nothing will display but can't seem to get the if code to work: <?php if(global ...
1
vote
1answer
71 views

Custom Metabox Not Saving

I've simplified a problem of saving custom metaboxes on update and still can't get the box to save the custom-field input to the database. This is the call from functions.php to an external file ...
0
votes
1answer
124 views

Notice: Trying to get property of non-object [closed]

i have a vote plugin and im trying to display the most voted posts on a "Charts" section the plugin has a built in command with <?php MostVotedAllTime(); ?>. I'm trying to edit the way its ...
0
votes
1answer
50 views

Sort categories by meta value

How can I make a list of categories with 4 last posts in each where every category is sorted by meta_value. For example, template without sorting by meta_value is http://pastebin.com/AeH6vx9b It ...
0
votes
1answer
80 views

How to store post meta in an array

I am creating a plugin, where the user can create forms with an unlimited amount of fields. I would like to store each field the user creates as an array in a post meta field. What would the code look ...
0
votes
1answer
69 views

Add Custom Fields After Page Title

I want to add my custom fields after the page title when you view it on the site. How do I do this? PAGE TITLE [CUSTOM FIELDS HERE] PAGE CONTENT
0
votes
2answers
73 views

Custom Theme Fields in Settings Menu - apply filters to one of those fields?

I found an interesting concepts of adding an additional option to the "General Options" in Wordpress. /** * Custom Theme Settings * see http://digwp.com/2009/09/global-custom-fields-take-two/ */ ...
0
votes
2answers
59 views

Any way to include custom fields in WP_Query results?

Looking for a way to include custom fields in the output of WP_Query. I am managing a site where nearly every post type has a lot of custom fields defined and it would be much nicer not to have to run ...
0
votes
1answer
111 views

Custom fields: dropdown values depending on other custom field value

i have custom fields like this: "country" - values: "USA", "Russia", "China" "city" - values: "Chicago", "Moscow", "Beijing" I want when user in custom field "country" choose value "USA" after ...
0
votes
1answer
44 views

KEY and VALUE custom field issue

I have this bit of code for displaying the value of links key of my custom fields. $links = get_post_meta($post->ID, 'links', false); foreach($links as $link) echo '<div class="first-link ...
0
votes
1answer
53 views

RSS Feed in Custom Field

I have a custom field intended for a rss feed. It is simpley a URL in the field, how do I take that url entered and output it into the correct section in the template? <?php include_once(ABSPATH . ...
0
votes
1answer
66 views

How to echo a different field if another field is empty?

I succeeded in getting both images and video to echo into a bootstrap carousel. However, I run into a problem when the post contains no images. If there are no images then there is no class="item ...
0
votes
1answer
36 views

Custom fields with square brackets in the name

I have some custom fields which I need to have square brackets inside. This would not be a problem apart from the fact that I need the end user to be able to reselect the custom field on another post ...
0
votes
1answer
212 views

Custom bulk action for media gallery items

I'm trying to add custom "Bulk Actions" to WP 3.5 new media gallery items. I started from this excellent tutorial which does exactly what I need, but with regular posts; so i tried to adapt it to work ...
0
votes
1answer
70 views

Calling custom profile fields?

I've hidden and created various profile fields using the following code: function my_user_contactmethods($user_contactmethods) { // You can get rid of ones you don't want ...
0
votes
1answer
107 views

WP_Query orderby not working with meta_value_num and menu_order

I have made a custom post type (sidebar_element) which are shown on sidebar. On each sidebar element admin can choose where in sidebar should that element be shown, ie. 'top', 'middle' or 'bottom', ...
0
votes
4answers
213 views

Add additional field to custom post_type

I am trying to add another field (subtitle) to my already created and existing custom post_type: team (code from functions.php in my *child*theme) <?php /** * Custom Post type register framework ...
1
vote
1answer
81 views

Better post meta efficiency?

I work with websites which require using Post Meta for Post Objects within a particular Post Type. I often add a Meta Box to a particular Post Type, to provide additional settings for the new Post ...
1
vote
1answer
221 views

How can i create a function to get youtube video time

Tom J Nowell posted this code to help me retrieve the YouTube video time. Functions // function to parse the code from the URL function parse_youtube_video_id_from_url( $video_url ) { ...
2
votes
3answers
102 views

Function to change meta value in database for each post

I have a meta key called 'prijs' in each post. The value of this meta key consist of numbers in the follow structure: 2,100.00 I want to remove the comma in the meta value to get this output: 2100.00 ...
0
votes
1answer
34 views

How to insert post into a page?

i created a custom_post_type: add_action('init', 'event_register'); function event_register() { $labels = array( 'name' => _x('Pacotes', 'post type general name'), 'singular_name' => ...
0
votes
1answer
415 views

Use ACF to display a customizable WooCommerce product add to cart button

WooCommerce is notorious for not being all that customizable (except for templating that is a seriously convoluted process). So, I am attempting to use Advanced Custom Fields (plugin) to create an ...
0
votes
1answer
39 views

custom header text

I am creating a custom website by modifying the twenty-eleven theme. I want to create custom text in the header area that is unique to each page. Is there a way to add a 'description' to each page and ...

1 2 3 4 5 25