Tagged Questions

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

learn more… | top users | synonyms (2)

0
votes
1answer
1k views

How to display data from custom fields I created?

I created an options page to ad gigs as custom posts in my theme. This is in my functions.php $config = array( 'id' => 'gigs-info', 'title' => 'Gig Info', 'pages' => ...
1
vote
2answers
348 views

List taxonomy term “Last Name” + “First Name” (taxonomy custom field) in a post loop

I have a few custom fields for a taxonomy "Author". The term title is the Author's last name, and one of the custom fields is his first_name. Now I need, in a post loop, to list all "Authors" of that ...
1
vote
3answers
2k views

Move value from one meta key to another

Migrating question: How would I structure a MySQL query to move the value from one meta_key to another meta_key? eg: I have an old meta_key of "guest_sort" associated with "posts" to ...
0
votes
1answer
176 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 ...
5
votes
1answer
7k views

Importing data for advanced custom fields plugin?

I have a member section built using the http://www.advancedcustomfields.com plugin. There are 300 members that each have the following data: Company name Specialism (check boxes) Web address ...
3
votes
2answers
924 views

Custom metabox for menu administration page?

I've been googleing around but failed to find a solution for my need. I'm using wordpress 3.0 and TwentyEleven theme as default pack. In the Dashboard -> appearance->menus that allow user can ...
0
votes
1answer
752 views

Wordpress query by multiple Custom fields and order by date

So here is my query: $args = array( 'post_type' => 'Event', 'posts_per_page' => 1000, 'meta_key' => 'event_informations_show_on_the_homepage', 'meta_value' => 'Show on ...
1
vote
2answers
751 views

How to show custom field's value under post/page title in wp-admin

I'm trying to add the value of a custom field under the post/page title in wp-admin list of posts/pages (much like excerpt mode in posts list) without hooking into the columns process since other ...
0
votes
2answers
768 views

Order custom posts by a date metabox

I have a custom metabox, where I store the date in plain text like this: dd/mm/yyand now I need to order the posts by that date.The custom field is called event_informations_date <?php $args = ...
3
votes
2answers
369 views

How to add new custom page or post blocks?

I would like to add custom contents to post, such as price, options and some others, I dont like to use the custom fields, because always i have to select from a drop down menu, I want these options ...
0
votes
1answer
480 views

Custom Query: query by post custom meta data

So I have a custom post called event, but I need to query only those posts which have a custom metabox(is a checkbox) called `Show On The Homepage: and only if that checkbox is checked. <?php ...
1
vote
1answer
446 views

Passing Custom Field Data as Array to be Saved (Resulting Custom Field Array is inconsistent)

I've been staring at this for hours, and it's clear I'm missing something, but I don't know what it can be... I have custom meta box for adding downloads to a particular post or page. All the data ...
1
vote
2answers
1k views

Alternative to simple fields plugin?

I have been building websites with WordPress for a couple years now, and have become very reliant on the Simple Fields Plugin. Essentially this plugin lets me attach extra fields to the bottom of my ...
1
vote
1answer
126 views

Char limit on custom blog-post form? [closed]

I want to setup a simple custom form for users to post, which will automatically: Subscribe user to updates (i.e. moderation approved, comment posted) Enable DISQUS xor IntenseDebate comments ...
2
votes
3answers
2k views

Add multiple images to a page sidebar

What I am trying to achieve is this: I have a simple page and I want to dynamically add multiple images to it on the sidebar one underneath another. I was thinking about either using meta boxes, post ...
0
votes
1answer
511 views

Custom field outside the loop and inside an array

I am trying to use a custom field inside a widget so it's therefore outside the loop. Taking it a step further, the theme I have is using an array to generate listings which makes it hard for me to ...
1
vote
1answer
443 views

Add More Fields to Users Pages (Admin Panel)

So I'm trying to create some custom fields for users. I need to give users access to a 30 day trial of some software and I want to keep track of that in the users page of administration panel. If the ...
0
votes
1answer
518 views

Get array of posts based on custom field values

I'm looking to pull up an array of posts based on custom field values: function GetPrimaryLinks($product){ echo '<ul>'; $args = array( 'product' => $product, ...
2
votes
2answers
311 views

Autoremove empty custom fields

The code you see below only works sometimes. I'm no pro on PHP so can anyone help me improve this code? I use it in my functions-php file in my wordpress mu setup. The biggest problem is that it wont ...
1
vote
1answer
3k views

Filter by custom field (meta_key) using JSON API

Hi I'm using the great JSON API for Wordpress and would like to filter my custom post types by a specific custom field (using the meta_key and meta_value params). The query in my URL looks like this ...
0
votes
1answer
37 views

Attaching global meta to custom fields

I post music videos on my site and I add the artist name as a custom field to each post. I want to associate certain meta with that artist name so I dont have to enter it everytime like the artists ...
0
votes
2answers
229 views

Efficiently sort only certain categories by custom field

I have a site with about 1,000 posts spread out over 70 or 80 categories. Some of these categories require the posts be sorted by a custom field, others not. I've got a working solution by having ...
3
votes
1answer
865 views

With WordPress Importer, why can't I import post meta containing a multi-dimensional array, in which value(s) of that array contain line breaks?

The Question With WordPress Importer, why can't I import post meta containing a multi-dimensional array, in which value(s) of that array contain line breaks? Is there a workaround that I can do to ...
-1
votes
2answers
1k views

Integrating WordPress Content into a jQuery Slider

I have a pretty basic 'featured-list - image slider' implemented above my content in my custom WordPress theme. How do I integrate WordPress content into the slider so that the slide content is pulled ...
5
votes
4answers
5k views

Prevent post from being published if custom fields not filled

I have a custom post type Event that contains a starting and ending date/times custom fields (as metaboxes in the post edit screen). I would like to make sure that an Event cannot get published (or ...
0
votes
1answer
192 views

Selectively hiding or allowing thumbnails of featured images on front page

I need a way to selectively hide or allow thumbnails of featured images to appear on the front page of my site. Ideally, it would be a custom field on each post, where I could choose - for example - 1 ...
0
votes
1answer
298 views

How to query posts that have certain post meta keys, and sort by meta key and/or value

I'm using this structure to make album lists. I'm using a key so I correspond lists to albums but I don't know how to reverse the output so the items start at the top with lowest key value. Any ideas? ...
2
votes
3answers
1k views

Search everything (posts, pages, tags, cpt, meta)

I would like to know how to use the built in wordpress search to return results from all content on my site. Specifically, I want to search; posts pages tags custom post type (portfolio) custom ...
1
vote
2answers
716 views

Adding a Nav menu to post admin

i want insert a dropdown menu with list of menus, that i've created in nav-menu.php, to post-admin... For example, when i'm creating a post, i want insert a menu "Paul" in a post (only a post that i ...
1
vote
1answer
437 views

How to query posts with certain custom meta data, and output Post data

I've been working on modifying the Thesography plugin to include the Google Maps API. So far I've had success doing so. I'm looking to take this one step further and have 1 large Google Map that ...
0
votes
2answers
781 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 ...
2
votes
1answer
921 views

wordpress plugin error handling

I am looking for a way to handle errors for a custom post type with its own custom fields. This is all part of a plugin I'm writing, however, after extensive research the only way I found is through ...
1
vote
1answer
409 views

Auto-remove custom field with no value on publish

I got some plugins that auto-generates custom fields. Does anyone know how to automatically remove empty custom fields from post when I press "publish"? A check I can put in my functions.php that ...
0
votes
1answer
155 views

Insert shortcode before and after a list automatically

I'm setting up a custom page template and I'm building a widget on it that lists albums with track lists. I use a plugin that allows me to expand text which is what I use to show tracks of the albums ...
0
votes
1answer
888 views

Importing Wordpress Posts With Custom Meta Data As CSV Files Through PHPMyAdmin

I have been importing data records as posts with custom meta data directly into Wordpress via the CSV Importer plugin. It works okay, however, there are some issues with it. Issues: 1) It takes ...
0
votes
1answer
141 views

Writing a custom Glossary plugin

I'm just about to start work on a Glossary plugin for my fishkeeping website. My fish guru has suggested that he would like to be able to include images and easily link to other glossary entries. ...
1
vote
1answer
147 views

How do I Add images uploaded in the post to a default custom field

I'm trying to add the URL of the post images in to a default custom field. Here is the code I got so far... Here is how I add the default custom field: add_action('wp_insert_post', ...
0
votes
1answer
157 views

Using a custom field inside a shortocde

Im trying to use a custom field inside a shortocde for a nextgen gallery slider on a page. The goal is to change the gallery id by entering in the corresponding id on page creation with a custom ...
0
votes
2answers
1k views

Add image URL automatically to custom field?

Does anyone know how I automatically add the URL of the uploaded image to a custom field? In other words, When I upload a image I want the url to the image to get a custom field variable ...
2
votes
1answer
421 views

Order by value in serialized custom field

Quite a pesky problem here. I've taken over a site that contains multiple information, serialised, within a custom field. For example: if ($new_query->have_posts()) : while ...
0
votes
2answers
116 views

Getting a custom post's custom field based on another custom post's custom field select

So I'm at my wit's end here. I've done this before plenty of times, but I think I have stared at this so much I am missing something. I basically have a custom post called locations. That custom ...
0
votes
2answers
264 views

Parent Child Custom Fields with Advanced Custom Fields

i have a navigation menu for Year, Make, Model of cars. Is it possible to Parent, Child custom fields so that if I have selected 2011, Honda, CRV I don't want other Models from non hondas being ...
0
votes
1answer
98 views

grab or load text on demand

What i want to do I want some content (could be stored any where in a post or custom field) to load only when the user clicks for it to load. This content could be any thing (text,images,html etc) ...
3
votes
1answer
261 views

Adding Custom Fields for Img in Posts

I'm wondering how I'd be able to set a custom field within my Wordpress posts. I want to have a field available to add an image via the Post dashboard - that has a max width & max height set, I ...
3
votes
2answers
2k views

Problem with serialized arrays in custom meta

I've recently moved my fishkeeping "species profiles" over from a custom DB to a customised WordPress custom post type. I did this by creating a PHP file which accessed the former database, extracted ...
0
votes
1answer
64 views

Calling Custom Field within Function wrapped with Divs.

Hi all I've created a function that basically allows the user to input the embed code for youtube into a custom field called youtube and this will then be styled on a wordpress post. Now I can get it ...
0
votes
1answer
641 views

Convert attachment ID into url?

I'm using the plugin advanced custom fields to create custom fields to create a relationship between two pages. The code below is looking at the relationship field and grabbing the page title and ...
0
votes
2answers
353 views

How can i loop through custom post type according to custom meta field?

I have a winery website with the custom post type "wine", each wine has various custom meta fields like "vintage", "pH", "Varietal-Composition" etc... Now, i would like to list all wines where ...
0
votes
1answer
289 views

Custom Fields Not in Search Results

I noticed that the content of my custom fields is not in my search results. Is there a good remedy for this? I could just hardcode my content into page templates but I would like the content to be ...
0
votes
1answer
279 views

How to check if custom field exists in this widget query

How can I include this (or something similar) <?php if ( get_post_meta($post->ID, 'url', true) ) { ?> <a href="<?php echo get_post_meta($post->ID, "url", $single = true); ...