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

learn more… | top users | synonyms (2)

0
votes
1answer
70 views

How do I enforce users to fill a determined custom field using WyPiekacz?

I have a Wordpress + Buddypress site. I've created two custom fields which must be filled in each post. Also, I have a form in a custom metabox to show them. I'm using WyPiekacz plugin to check for ...
2
votes
1answer
351 views

How to add dynamically the main parent pages's custom fields and their values to all sub-pages?

I have a main parent page with multiple sub-pages. The main parent page has some custom fields (meta boxes?) with specific values. My intent is to add dynamically these custom fields and their values ...
0
votes
1answer
602 views

dynamically add a custom field or metabox to custom post type [duplicate]

Possible Duplicate: Create more Meta Boxes as needed I am creating a plugin that registers a Custom Post Type. Let's call it "Cars". I am looking to be able to add custom fields(or ...
0
votes
1answer
172 views

Custom wpdb query - how to sort post by another table meta_count

Custom wpdb query code below works well but I need sort by stt2_meta table meta_count , <?php $querystr = " SELECT ID, post_title FROM $wpdb->posts ...
0
votes
1answer
374 views

How to change permalink on headlines in rss feeds?

On mysite.com/feed the headlines of my posts listed in the feed are linked to that posts permalink, for example mysite.com/my-first-post. This is standard behaviour. But sometimes I would like this ...
1
vote
1answer
845 views

How to call custom category field data in theme?

I am trying to add two custom fields to my categories (which I have done thanks to this answer - Any examples of adding custom fields to the category editor?) And now I need to call them within my ...
0
votes
3answers
264 views

Display a custom field rating system in the front end

I have added a content rating system to my platform where the authors can select which audience their post is appropriate for. Currently, these options are available: Unrated G PG ...
0
votes
1answer
202 views

loop through custom post-type with two meta_keys

I have a custom-post-type named my_project. This post-type has two meta-boxes: is_featured is_featured_position So essentially in my backend of the post-type I can set a checkbox for is_featured ...
1
vote
0answers
36 views

Displaying and searching Custom Posts

I'm trying to convert my existing web site from old-school HTML to WordPress, and have created a series of Custom Posts for my whisky tasting notes. However, I'm stuck trying to set up a page that ...
0
votes
1answer
980 views

Order by custom field date?

I've created a category "Expire Soon" and i want to insert and sort the posts by custom field "expiration_date". I use this code but the posts are sorted by custom field "expiration_date" but not by ...
0
votes
2answers
84 views

Function to retrieve a picture if there is no picture is attached

How can i retrieve a picture, let say ( No picture ) when i don't add a picture in my custom field I use this code to retrive the field... <img class="film" ...
2
votes
1answer
42 views

Can you ungroup Custom Fields?

I have been using a lot of Custom Fields to use Wordpress like a CMS, beyond simple posts and post meta. The admin area for adding new posts has little "widgetized" movable areas like the ...
0
votes
1answer
121 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
901 views

Display posts where date field matches current month?

I have a loop which displays all the posts of the "events" post type on my site. Each of these posts has a custom date field "event_date", which I sort the display of the loop by. I would like to ...
0
votes
1answer
41 views

if statement display content even though no data

I am trying to figure out why this page is showing content when the criteria isn´t being met. I am using this code, so if there is a website in the custom meta box if will display the DIV with the a ...
1
vote
1answer
2k views

How to add image attachment to post from a single meta key (Woocommerce)

I'm using Woocommerce for products. All products are imported automatically by a plugin. Currently when i want to attach an image to a product (a post type) i have to use "Featured image" to display ...
1
vote
3answers
2k views

Creating custom field with drop down on new post page

I Am trying to create a default custom field drop down with pre populated values from the DB to be shown while creating a new Post or editing a existing post. I am aware about how to add a single ...
-2
votes
1answer
80 views

Outputting custom field query from a plugin to the website header

I added the code below to the plugin that I'm working on to display the values of the custom fields but it shows up but blank. function mySEO() { require('wp-site-gps-transport.php'); } // Add ...
1
vote
3answers
1k views

get_post_meta not working inside loop

I was hoping for some assistance with a custom meta box that I added to my genesis child theme. The data is being saved properly, and stored properly, but when I try to echo it out using ...
0
votes
1answer
151 views

Custom Fields for Page Edits

Currently using the code below for SEO. When the Code Below if added to the header works perfectly but then you have to manually create the fields that are queried. Most Clients hardly get around the ...
1
vote
0answers
32 views

URL Rewrite fires when retrieving a custom value?

I'm working on an old WP Multisite instalation (3.0.1) and something weird is happening. The guy who built the site made a decision to store direct URLs instead of Post IDs to a Custom Field. And ...
4
votes
1answer
410 views

What is the advantage of the wp_options design pattern?

As we all know, a design pattern that is used frequently in Wordpress' DB code is the idea of persisting data for a particular object (blog/post/comment), indexed with a particular name or key. We ...
0
votes
2answers
2k views

How to get custom image field of specific post id

I have a page where I'm pulling in content from another post, outside of the loop. I've been successfull at getting the content of the specified post, but I cannot get the image from a custom field ...
7
votes
7answers
3k views

Individual Widgets per Page

In my (page-only, no posts) Wordpress site I have a number of static blobs in need to put in a sidebar. We could call/tream thoses 'blobs' as widgets. At least they'll have a fixed html content, like ...
2
votes
1answer
518 views

Calculate the sum of certain the_sub_fields

I am trying to calculate the sum total from two custom sub-fields using ACF. The custom field is called 'repeater' and the sub-field is called 'space_avail'. I've tried the code below but it just ...
0
votes
1answer
89 views

How to keep a record of changes to a custom field?

I have a custom post type that hold real estate listings and I need to figure out a way to keep a record of the price of the property is listed for. For example a user lists a property for sale and ...
0
votes
1answer
109 views

Jquery on custom-field backend

I need some help because I want to use some jquery (and css probably) on some custom fields on post edit screen. What I need exactly is to make , and . magically apear when user types a number: ...
3
votes
1answer
474 views

Edit Imported advanced Custom Fields from wordpress Dashboard

I have imported advanced custom fields from one of my other site and now I want to add few more options to those fields but I can't figure out how to do it via Dashboard? I have imported the field ...
0
votes
1answer
60 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() ...
1
vote
1answer
138 views

handling csv data with a custom post type

I have a custom post type which represents a 'race' and there are meta fields for 'distance' (5km,10Mile) and 'type' (track,road,crosscountry). We get the race results as a csv file which contains the ...
8
votes
1answer
690 views

Any way to add custom options to Gallery Settings?

Now that Wordpress has updated to version 3.5, the media gallery has been overhauled and this custom options solution doesn't appear to work anymore. I'd like to add a couple of fields to the gallery, ...
0
votes
1answer
145 views

Fill custom fields when saving custom post types

I have a Custom Post Type called "Report." It has some custom fields, including the name of the place where the post has been written. I would like that when a user saves (or updates) the post from ...
0
votes
1answer
43 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
2answers
755 views

Select custom posts by meta_value and sort by a different meta value

I have my query set up like this: $article_query = new WP_Query(array( 'meta_key' => 'issue', 'meta_value' => $post->ID , 'post_type' => ...
0
votes
1answer
274 views

Give a permalink to Custom Post Types without title

I have a "report" Custom Post Type registered in this way: register_post_type( 'report', array( 'label' => 'Reports', 'description' => '', 'public' => true, ...
1
vote
1answer
479 views

How to add a Custom Meta Box for more than one Post Type?

I am using the following code in functions.php for adding a custom meta box. The custom post type is themes. I want to add more post types, how can I? add_meta_box( 'my-meta-box-id', 'Demo ...
0
votes
1answer
116 views

Is there a way to add a custom input field for every taxonomy term in WP post editor?

I've created a custom taxonomy for my posts, and I was wondering if there is a way to add an extra input field (a text input) for every taxonomy term inside the edit post panel. What I want is not a ...
0
votes
2answers
252 views

Custom Query based on custom field of a single post

I have posts which have a custom field date in the format yyyy-mm-dd. What Im trying to do is list all the posts for a specific year on the side of a single page based on the year in the custom field ...
4
votes
1answer
597 views

Move from old custom field to new post_thumbnails

I've just taken over a busy WordPress site that's got ~800 posts so far. The site's been around long enough that it was started up before post_thumbnails was available. They worked around that ...
0
votes
2answers
2k views

Creating a custom menu/widget area

I'm looking to create a /menu/widget area like the following site: http://www.microsoft.com/en-gb/default.aspx please see sections under downloads, security, support, about is this considered a ...
0
votes
1answer
68 views

Create a new custom field for all posts based on current custom field

I have a custom field for a large number of posts that contains the url for a youtube video. I used to grab the ID from the video and use that to build the thumb but in a new version I'm actually ...
0
votes
1answer
98 views

How to store datetime from custom meta box so that it can be sorted by

I have a custom meta boxe on a custom post type that has two date time fields. I will need to sort by these fields and also return posts that contain a date between two dates. Will WordPress ...
0
votes
1answer
114 views

Show posts containing or not custom field

I'm trying to show aditional posts in the author's page. This page must have posts containing a specific meta_key and meta_value, where the displayed author it is not really the WP post's author. ...
0
votes
1answer
214 views

Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?

I'm trying to implement AJAX into my post edit form in order to hook a custom wp function into a link click. So far I've been able to register my custom js file into my admin header. However when ...
1
vote
2answers
4k views

Woocommerce with metabox plugin

I'm using woocommerce as my e-commerce solution and the metabox plugin ( http://www.deluxeblogtips.com/meta-box/ ) to make my life a lot easier when implementing meta boxes. I've never had any issues ...
1
vote
1answer
2k views

Using WP Query to search by multiple meta fields

I made a custom search form with select boxes and text fields. I have a select box with options like "renting" and "selling" (its a real estate site) There are also input fields for minimum and ...
0
votes
1answer
659 views

Truncating characters in Advanced Custom Fields works some places but not others?

I'm using the Advanced Custom Field plugin - although I'm not positive that is relevant. Nonetheless, I can't get substr() to work at all using this method: $givchars = 5; $postgiv = ...
0
votes
1answer
122 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 ...
1
vote
1answer
187 views

Importing Data from a Non-WordPress database, into WP

I'm migrating data from a totally different database style into WP. The main issue I'm trying to wrap my head around is how to import any meta data, given that WP uses a key value pair style for meta ...
1
vote
3answers
53 views

Per site configuration

I'm building a custom theme that I will reuse on more than one site and would like to be able to configure some things from the admin. For example setting the Twitter and Facebook pages links without ...