Custom Fields are fields that can holds arbitrary extra information known as meta-data.
1
vote
1answer
348 views
Sort posts based on multiple custom fields
I have a three custom fields
Meta Key → YOUR_PREFIX_newcar_body_type
Meta Key → YOUR_PREFIX_newcar_transmission_type
Meta Key → YOUR_PREFIX_newcar_variant
and I have to sort posts ...
1
vote
1answer
1k views
How do I use wp_query for WordPress search?
I would like to create a custom search form to search posts based on the values of about 4 custom fields. I tried using wp_query to achieve this but so far my biggest problem is that the I don't get ...
0
votes
1answer
19 views
filtering custom post types via meta data drop down
I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
0
votes
1answer
14 views
Search that will look in custom field, post title and post content
I am looking for a way to perform a search, and while performing the search, it checks a custom field named keywords, the post title and the post content. If any of those fields have results like what ...
0
votes
1answer
15 views
Import data from arbitrary CSV to WPAlchemy meta fields
I've created a custom post type with several custom fields with the help of WPAlchemy, and now I need to import a bunch of stuff from some CSV files.
I'm using WPALCHEMY_MODE_EXTRACT.
By toying with ...
0
votes
1answer
38 views
Rewrite custom post type url's adding meta box values
I've got these custom post types (CPT) and meta boxes:
Movies (CPT)
Genre (Meta box)
Genres (CPT)
If one movie is called Die hard then I want the permalink to be:
/genres/action/die-hard
This ...
0
votes
1answer
34 views
Custom wysiwyg editor doesn't execute shortcodes?
I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page.
I use different customfields assigned to specific elements in ...
0
votes
1answer
18 views
Group pages by custom field values
I plan to have each individual product as a page, with custom fields for : Brand, size, feature 1 and feature 2.
My question:
Will it be possible to build a summary page template say for Brand, ...
0
votes
1answer
232 views
Transfer taxonomy to custom field
I have a blog with movie critics and I'm using many taxonomies to add some informations about the movies, like director, actors or it's year. Using taxonomies is really useful to display all movies ...
0
votes
1answer
38 views
404 on Pages for Custom Post Type & Query_Posts
It took me quite a while to find a good solution for ordering a custom post type by two custom meta keys. When I finally got it working, I found out the pagination no longer works. I've tried dozens ...
0
votes
1answer
47 views
Custom post type and custom taxonomy archive inaccessible
I've created some custom post type let say:
post_type_1
post_type_2
Those post types are related to each other, every post_type_1 has parent of many post_type_2.
Then I created a custom taxonomy ...
0
votes
1answer
32 views
How can I create a menu items from meta box based on users input
I have created a metabox that takes a name that the user can give as an additional name of their post. I am wondering how I can automatically create a menu item based on the name the user input into ...
0
votes
1answer
17 views
I want to add a custom field in the rss title of each post, but don't want it to be shown on the site
I've seen that other sites have done this but didn't manage to do it myself.
I have certain custom fields for each post and I want one of these custom fields to be shown in the RSS feed in the title ...
0
votes
1answer
25 views
Custom metaboxes not saving after switching themes
I recently switched themes and copied over my metaboxes from the old functions.php into the new one. They show up but when I click publish/edit they dont save
add_action( 'add_meta_boxes', ...
0
votes
1answer
28 views
Logic for Nearby places with post and categories
I'm developing a website which has states as categories and posts as cities. What we are trying to do is identify each post (city) and also show nearby cities to the current city.
As of now we are ...
0
votes
1answer
45 views
Custom Fields and Buddy Press
I would like to setup a simple feature in Groups with buddypress. Basically, I would like the landing page the group where the HOME button is for example, to have 3 fields... just like so:
I'd like ...
0
votes
1answer
32 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
17 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
40 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
111 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
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, ...
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'); ?>
...
0
votes
1answer
49 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
51 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
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
209 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
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
412 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
157 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 ...
0
votes
1answer
151 views
Facebook social publisher and custom post type fields
I have a problem with how Facebook plugin shows my WordPress-based posts on my timeline. What basically happens is that the post image isn't shown.
Now, the post image I want to show is a custom ...
0
votes
1answer
57 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
50 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
65 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
40 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
147 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
1answer
72 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
37 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
28 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
112 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
91 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
234 views
Why my meta boxes won't show in front post page?
I see it everywhere: in single post, in category archives etc, but in front page post not.
I display the metaboxes in this way:
<?php if (get_post_meta($post->ID, 'test_1', true) != '' ) { ...
0
votes
1answer
115 views
Attach images to posts using custom fields (just paths to images already upld)
I'm setting up a real estate website, which i make listings using a custom post type 'listings' in which I have multiples metaboxes for beds, baths, and all other informations.
I use a plugin to ...
0
votes
1answer
185 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
44 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
67 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
329 views
How to implement a Google map store locator
I have followed the following Google developer doc about creating a store locator usng PHP & MySql.
https://developers.google.com/maps/articles/phpsqlsearch_v3
I have this working but now I ...
0
votes
1answer
116 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
192 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
71 views
Bulk move (or copy) from a custom field to the post content?
I need to move (or copy) the contents of a custom field into the main post body, replacing any existing content.
I need to do this for a few hundred posts...Is there a quick way of doing this?
I can ...
0
votes
1answer
123 views
“Matching” or “Linking” Two WordPress Pages: Custom Fields?
I'm helping with a custom multi language site. We have one page in English, then an equivalent page in French. I've got a "SWITCH LANGUAGE" link in the main container (next to the breadcrumbs) that ...

