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

learn more… | top users | synonyms (2)

2
votes
2answers
189 views

Conditional to modify query results

I'll admit, I'm not a PHP expert, nor am I familiar with all of the WordPress functions and hooks. I've been stuck on an issue, searching for help without much success, and I was hoping that someone ...
2
votes
2answers
317 views

Date, Time, and Timezones

I am a bit confused about using dates/times along with timezones in WordPress. I have the following questions: What is the purpose of the timezone setting in the Admin -> Settings section? Assume ...
0
votes
1answer
137 views

How to sort Custom Fields by a value

i use below code in home page for show a table of custom fields. but i don't know how sort this table by duration value. <table> <?php while(have_posts()): the_post() ; ?> <?php if ...
0
votes
1answer
52 views

Convert many posts from having a specific meta_key to use a post_format

I have 350 posts that were using a plugin-provided option stored in a meta_key ("custom_post_template", to be precise). I want to convert these posts to assign them a specific post_format ...
0
votes
1answer
155 views

Custom fields: my custom checkbox area doesn't seem to work

I'm trying to create my own custom fields meta box filled with just checkboxes in pages. I'm basing it off this tutorial here. I was able to get the original tutorial to work, but when I started to ...
0
votes
1answer
231 views

Query Problem - Show posts within category 'x' that have a custom field between 'y' and 'z'

I'd like to display all posts within a given price range. For example: When a user inputs 100 and 1000 (in two separate form fields) - my site will display all posts that have a custom field called ...
0
votes
1answer
323 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, ...
0
votes
1answer
127 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'); ?> ...
0
votes
1answer
244 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
97 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
85 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
45 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
202 views

force category table refresh when adding new category

i wonder if there's a relatively easy solution to this : i have added a custom field to the categories, which in turn gets displayed in the right hand table under its own column name. (essentailly ...
0
votes
1answer
87 views

List custom field values ​​in alphabetical order without repetition from the current category?

I have this code: global $wpdb; $query = "SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = 'product_brand' ORDER BY ...
0
votes
1answer
274 views

Incorrect data after modifying post using backlink from wp_die

I have hook: function myHook( $post_ID, $post ) { $data = get_post_meta($post_ID, 'data', true); if ($data) { _log('data:' . $data); /* here some checks and validation */ ...
0
votes
1answer
107 views

When editing a post with a custom meta box the values aren't displaying correctly

I followed this tutorial to create a custom meta box with a simple two option drop down. My code is below. The custom fields are saved when creating a post, and edit when I change the value and ...
0
votes
1answer
130 views

Displaying shortcode content inside custom field without images

I need to be able to display different shortcodes inside custom fields. I have found a method that almost works perfect, but since that uses get_content, it also shows the main featured image of ...
0
votes
1answer
61 views

Links not opening as they should. Custom WP plugin

I am working on review plugin for my wordpress blog, and I have small problems. First this is the Plugin code: add_action( 'init', 'create_devicemondo_review' ); function create_devicemondo_review() ...
0
votes
1answer
45 views

Display code if title of the custom post matches title of other post

I have two custom posts, one called "reviews" and another called "guides". I want to display a custom field from the post reviews if the title of the two matches. Something like this: (I am not good ...
0
votes
1answer
129 views

Custom search with meta fields

I made a custom search form with text fields and dropdown. Now, my form is in its own template file - sidebar-search.php. I have also made the searchform.php which should get the data from sidebar ...
0
votes
1answer
577 views

Filter by Custom Taxonomy AND Custom Field

I'd like to give my users the possibility to filter the posts by Taxonomy Terms AND Custom Field values. Like so: [tax]Country:[terms] [tax]Company:[terms] [field]Price:[values] Filtering by ...
0
votes
1answer
76 views

Should I use a Meta field or custom table?

From a performance only perspective, can anyone with more more experience of the WordPress core tell me if writing something like a post view counter to a separate table in MySQL would be quicker for ...
0
votes
1answer
91 views

Home page: using custom fields for posts and pages

in my home page I'd like to display some pages and posts title using the custom fields. Unfortunately my code prints only posts title. If there is a key "highlights" print the title. Here my code: ...
0
votes
1answer
356 views

Display custom field outside the loop

Inside of my WordPress theme directory I have a standalone PHP file called image, this currently looks like this.... <?php define('WP_USE_THEMES', false); ...
0
votes
1answer
1k views

How to delete file uploaded by Plupload

I follow the steps from here to integrate the plupload in metabox. Everything is working fine. But I do found one disadvantages of this guide. When I click 'Remove' link from the uploaded images, it ...
0
votes
1answer
37 views

list pages by custom_field?

Is there a way for me to sort these posts alphabetically according to the custom field I have defined (last_name)? <?php $page_id = get_the_ID(); $args = array('sort_order'=>'DESC', ...
0
votes
1answer
240 views

How do I filter a custom post type loop by a field?

OK, very simple task, I'm just not good at PHP. I have a page where I want to list some staff using a styled list. Here is the page all working fine, I just need to divide the results - ...
0
votes
1answer
130 views

Custom meta box includes

I am having some problems including files for my custom meta boxes. I have a structure like so: post-meta.php cmb teaser_meta_box load.php initiate.php display.php save.php So ...
0
votes
1answer
98 views

Filtering posts by WORD in custom field

I need to filter my posts in categories pages, by showing only posts that have specific WORD in custom field value. I need php code that i should add in loop for this category. Details: I need loop ...
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 ...
0
votes
1answer
66 views

Allow authors to create article image

I want to allow contributors to upload images while creating posts. But the catch is, I am building the post display pages out of my own custom PHP. Every article written will follow the same ...
0
votes
1answer
169 views

Create widget that filters posts on current page based on entered value

Can somebody point me in the right direction wouldnt have a clue how to start programming this. I want to filter post based on price (custom value) thru a widget. So lets say you click on a post ...
0
votes
1answer
254 views

Undefined Variable (Displaying image via custom field)

I'm getting "an undefined variable in line 6" while trying to display an image from a custom field. It's pulling the name/link of file; but not image. Here is my code <?php query_posts( ...
0
votes
1answer
56 views

Radom post image/link based on custom taxonomy

How would I make a widget to display a random post's image and permalink? I would like it to pull from a specific custom content type and only posts have set the custom field of "featured" to "yes".
0
votes
1answer
41 views

I would like to display different text on different pages

I have at the very top of my page a line of text within a h1 tag thet I use for seo reasons. the text and html around it is written in my header.php. but I would like to write differnet txt so it ...
0
votes
1answer
376 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 ...
0
votes
1answer
68 views

Custom Fields link to other pages, not search

I am attempting to create a website, which has a similar taxonomy system to IMDB, but instead of Movies, it is referencing Musicians. I have created a custom post type for Artists, with a few custom ...
0
votes
1answer
78 views

Semi-Private Comments + page comments -> is it possible?

is it possible to do this: User need to register and can only see comments written by himself or by an admin. Admins can see all comments create a profile page that user can see all their comments ...
0
votes
1answer
177 views

How to organise via Custom Fields on Category Page

I have a custom field named: eventdate The posts are all in the standard post type. I want to order by this field ascending. I have tried over 15 different solutions but no joy . Every post simply ...
-1
votes
1answer
101 views

Can't sort custom column on user.php by number / meta_value_num?

Everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { ...
-1
votes
1answer
100 views

Custom field not showing

I am trying to get 3 images and their links which I have defined as custom fields. The custom field aren't displayed and when I var_dump() my get_post_meta() it returns string(0)"", what am i doing ...
-1
votes
1answer
188 views

I used a custom field for header image and can't get it to show up on posts

I have recreated it in Wordpress and am working offline. Everything is good and works the way I want it to. I have does this in order to add a blog. To get the image above the content I used custom ...
-1
votes
1answer
36 views

Exposing custom fields to the user in custom type post

I have a custom post type - say Hotel Booking - all the data are filled in by the admin and users can browse through different Hotel Rooms. Now, I would like the user to be able to tick additional ...
-1
votes
1answer
580 views

How I can change PayPal IPN 'custom' field in woocommerce?

I use Woocommerce plugin. All works great, but I need add to PayPal IPN 'custom' field only 1 word instead "order_id" that writes at 'custom' field now. I trying edit this file: ...
-1
votes
1answer
110 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 ...
-1
votes
1answer
376 views

Query posts by Custom Meta (checkbox) & Genesis Grid Loop

I've been trying tons of things for the last 2 days. I'm at a standstill now. I read a ton of posts here but nothing has worked yet. I have a CPT 'artists'. This CPT contains a custom field ...
-1
votes
1answer
115 views

More Fields WP Plugin

one of my clients use More Fields WP plugin and we want to generate a feed of the data entered using that plugin. http://wordpress.org/support/plugin/more-fields Have installed JSON WP plugin to ...
-1
votes
1answer
622 views

How do I add a new field/meta box to the Custom Post Type Portfolio in the Kaboodle Wootheme?

I've created CPTs using Types in the past, and I've built custom templates, but finding the method for adding a field to an existing Woothemes CPT is frustrating. I'm struggling to find the correct ...
-1
votes
1answer
147 views

Shortcode not picking up custom field

I created a custom field that allows me to set the cropping style of timthumb, but I am also using short code to populate a page with blog posts, but the shortcode isn't picking up the customfield, so ...
-6
votes
1answer
127 views

Custom Fields within custom post type

Am newbie. I have a custom post type 'dogs' and i want just 2 custom fields in this type. A pic on the left and text on the right - repeatable fields. Anyone know how to do this? I've no clue of php ...