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

learn more… | top users | synonyms (2)

0
votes
2answers
192 views

Rewrite Custom Fields url

I use custom fields named 'url' to add another website url (like http://www.youtube.com), I want to rewrite the 'url' as http://www.mysite.com/go/123. I tried all rewrite plugins, no one could do ...
0
votes
2answers
197 views

Get custom field from page, in a post?

I'm not quite sure how it works, if you're on a post (single.php), does it count page.php as the page it's on? What i need to do, is get a custom field assigned to a page, from a blog post. I need it ...
1
vote
2answers
932 views

List all images from a single post meta value

I have created a custom post type with an image gallery upload. Now I am trying to display the gallery on the front end. This is what I have so far that works to display 1 image, but if multiple ...
2
votes
2answers
321 views

Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]

I am currently trying to perform a custom query on the authors page (author.php). I have two custom fields for posts that I want to query against (post_photographer and post_videographer). What I am ...
1
vote
3answers
882 views

Buddypress Add unserialized Profile Fields in Members Loop [closed]

I'm trying to show profile fields with checkboxes and drop-downs in the members directory loop. Example: Next to each member in the directory I want to show the Gender they selected This code works ...
0
votes
2answers
219 views

Using a string from a custom field within a link

I want to show the image only if there is info in the field. And the link around the image uses the info in the field. The mailto: field is coming up blank. So I'm guessing/hoping I'm doing something ...
0
votes
1answer
2k views

custom comment_form fields not displaying

My ideal comment form will have 3 fields- Name, Location, Comment. I'm using the following bits of code- comments.php <?php comment_form( array( 'fields' => apply_filters( ...
6
votes
1answer
81 views

Is it safe to store a user setting you don't want the user to ever modify as a user option?

I have added some custom user options to the profile page on my site, and most are all OK for the user to modify themselves. These options live in their own section. The users have read access and ...
1
vote
1answer
123 views

Get content from pages with same meta_key from Database

I need help! I'm doing this template page and I want to get content from pages with the same meta_key. I want to display all pages thumbnails that has the value "red" in the meta_key. The problem is ...
1
vote
1answer
381 views

Run a check for multiple meta key values

I am having a heck of a time getting wordpress to display all values of a certain meta key correctly. I wonder if I am going about this the wrong way? My end goal is to run a check to see if there ...
0
votes
1answer
545 views

Custom field to array?

I have a posts query that queries posts by ID but want to select those posts by enetering a custom field. Here is the query and where I want to put the custom field: $query_args = ...
0
votes
1answer
160 views

custom comments form for custom post type

Hello everyone I am creating a theme dedicates to hotels display and booking in which I have created a custom post type 'Hotels' so now I want a mechanism to book the hotel rooms and a "book now" ...
0
votes
1answer
46 views

Meta boxes only displayed when editing normal (default wp post_type) posts

I've multiple meta boxes for my main/default post types. I also have multiple post_types where this meta boxes make no sense. Can you hint me on if/else function I would use on displaying meta boxes ...
0
votes
1answer
141 views

Fallback for empty custom fields

I'm using, for example: <?php echo get_post_meta($post->ID, "Pricing_Land_Only", true); ?> but need to know how to implement the 'else' function to display 'Nothing found' if I didn't type ...
-1
votes
1answer
644 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 ...
4
votes
2answers
4k views

Most efficient way to add javascript file to specific post and/or pages?

I am wondering what the most efficient method is to add a javascript file specifically for a post and/or page. Here are a few solutions I came up with: Switch to HTML editing view and post your ...
1
vote
0answers
98 views

Add first url to custom field on publish_post

I post a lot using Press This and I allow other users to post. Lately I noticed some duplicates and I m trying to find a way to stop this. I am trying to get the first link from the post, add it to a ...
0
votes
2answers
441 views

Hide custom fields when empty

I am trying to create a function to add data from two custom fields after the entry title. I get it to show correctly when these fields are filled in. The fields are a image source url and an url the ...
1
vote
2answers
425 views

Getting the ID of any image for use in functions.php

I've added two custom fields to attachments on my site, so the user can add a special image credit. I'm trying to write a function that looks to see if either of the custom fields are populated, and ...
0
votes
1answer
199 views

Echo text if field under user_meta is empty with get_users()

With get_users() I am listing users and their information. I've a custom field in the database, people_lists_class. <?php $blogusers = get_users('role=contributor&orderby=display_name'); ...
2
votes
1answer
280 views

meta_value_num sort glitch

i have a custom query, and I have a meta key that contains a sequence number: 1.1, 1.2, 2.1, 2.2... 11.1, etc the problem occurs when the numerical sequence gets in to double digits, ie. 5.11, 5.12, ...
0
votes
1answer
33 views

Hard Define Custom Field Value

Is it possible to hard define a custom field value with a function? As in, no matter what WordPress will always set the value of 'some_meta' => 'this'
2
votes
1answer
5k views

Can I query custom meta data through WP_Query

Ok, my question is a bit complex so I will try and give a general explanation and then go into details afterward. I am running WordPress 3.4.2 and I am using WCK Post Type Creator and WCK Custom ...
2
votes
1answer
635 views

Custom text-only header

I am developing a WordPress theme and would like to make use of a custom header on a the homepage (I'm using a custom page template). I would like this header to not include an image, but rather an ...
4
votes
1answer
2k views

Using Custom Fields in Custom Post Type URL

I'm developing a car site that has showrooms. Each showroom needs it's own custom URL based on it's location. The location (City and County/State) is already inserted as two custom fields. So for ...
0
votes
1answer
38 views

Specific coditional usage [closed]

I have some trouble making work a conditional inside a Function. check this out: I'm using this function: function get_spec_1(){ $desc1 = get_post_meta( get_the_ID(), 'eco_mb_tp_1', true!= "" ); ...
0
votes
3answers
358 views

Adding custom field to an array

How can I add a custom field to an array? To complicate matters, custom field is on the Author's page, not on a regular post. It's added via Advanced Custom Fields. Typically, that field value would ...
1
vote
1answer
58 views

Cannot retrieve a custom RSS field from posts

The goal is to display a featured thumbnail micro thumb as a custom field in RSS. This is what I've done: //theme functions.php function rss_post_thumbnail($content) { global $post; ...
1
vote
3answers
2k views

custom field with total count of Facebook likes, comments and shares

i want to make custom filed that contains facebook like count for the post url to get the likes i used this code function fb_count(){ $link = get_permalink($post->ID); $content = ...
0
votes
1answer
3k views

Add custom attributes to a post

My blog is mainly composed of posts describing hiking. Actually, since I just moved from a Wordpress.com blog to a self-hosted Wordpress blog, every hike is inserted in a simple post. However, every ...
0
votes
1answer
475 views

Empty meta-box returns publishdate if no value is set?

I have no idea why this would/could happen. I have a custom metabox for an "event_end_date" set for a custom-post-type. If I leave this field blank it always puts out the publish-date of the post ...
0
votes
1answer
612 views

Add custom fields after post/page title

I am using the Headway theme, and I need to add custom field code to page & posttitles. This is what I need to be able to do. The red button will be added through a custom field. It needs to be ...
0
votes
1answer
3k views

How to get source of custom meta image?

I'm working on a CPT (custom post type) page template and would like to get the source of custom meta image. For post_thumbnail's this is rather easy using wp_get_attachment_image_src(), but if I ...
2
votes
2answers
3k views

Advanced Custom Fields Validation

Is there way to use custom validation on an advanced custom field? For example, I might not want a textfield to have a value that starts with certain prefix, or I might want a number field to have a ...
0
votes
1answer
246 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 - ...
3
votes
2answers
2k views

How do I paginate search results for custom post types?

I have a Custom Post Type called "cars" that stores several custom fields along with the standard Title/Description fields. I need users to be able to search through the CPT based on the custom fields ...
1
vote
1answer
113 views

Custom Field returning Numerical Value for Image rather than URL

I have been trying a way round my latest WordPress problem all morning and I feel now is the right time to shout and ask for help. I have been trying to create a people directory, I'm there except ...
1
vote
1answer
224 views

Custom Fields - Taller editing area

Don't know if this is possible, but can the custom fields be adjusted to be taller in the admin panel? It's a bit tedious to have to stretch the textbox every time you want to edit an existing field ...
0
votes
1answer
388 views

List custom field values ​​in alphabetical order without repetition

The function below lists the custom fields as in this example: Frank Capra Alfred Hitchcock Woody Allen Woody Allen Frank Capra Pedro Almodóvar Pedro Almodóvar I introduce the values ​​in ...
2
votes
2answers
4k views

Multiple orderby values in WP_Query

I'm trying to come up with a query to sort by multiple orderby values. Here's what I have so far: $dept_id=2; $query=new WP_Query(array( 'post_type'=>'wpcontactus', ...
4
votes
1answer
219 views

Prevent reload confirmation after AJAX save

I am saving information in the admin panel via ajax. The problem I'm running in to is the "Are you sure you want to navigate away from this page" popup appear, even though everything has been saved. ...
0
votes
1answer
38 views

“After file loaded” action

I have a plug-in that allows for repeatable fields. There will be an image and the image description. The description allows for tinyMCE editing. There are obviously problems with this, but I think I ...
0
votes
1answer
79 views

How would I attach media/images to a post based on a ID stored in a each post's custom field

I have converted a site over to wordpress recently. I was able to import all the posts via a CSV importer, but not the images associated with each post. The post type is "machinery". The custom ...
4
votes
1answer
365 views

Using get_post_meta with new_to_publish

I'm trying to read the custom fields set by the user when publishing a new post: function doSomething($post) { $meta = get_post_meta($post->ID); error_log("post meta: ".print_r($meta, ...
0
votes
1answer
305 views

WP_Query () using taxonomy, custom post types

I want to implement this query using WP_Query(). SELECT * FROM wp_posts as posts LEFT OUTER JOIN wp_postmeta as postmeta ON (postmeta.post_ID = posts.ID) LEFT OUTER ...
0
votes
1answer
134 views

WP-eComerce Advance Meta Tag data in descending order [closed]

I am use WP-Ecommerce plugins for ecommerce support Now i am set custom meta like this and it will display in ascending order like this so i need to display it in descending order how can i do ...
0
votes
1answer
617 views

How to check for specific meta box value on front end and output accordingly

I have a custom meta box with two different radio buttons that can be selected. One is for displaying the content in a "large' format, the other is for displaying content in a "small" format on the ...
1
vote
1answer
156 views

how to fetch the meta field keys/meta boxes from a post type?

I need to find all the meta keys or meta boxes preferably from just a post type ...couldn't find any wordpress function to do this. Any custom queries?
1
vote
2answers
2k views

How to add a predefined custom field without using a plugin?

I´m trying to find a snippet to add a predefined custom field. Does anyone know how or where i can find this? I know I can do this with CustomPress, but I´m trying to do this without a plugin.
0
votes
1answer
132 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 ...