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

learn more… | top users | synonyms (2)

0
votes
1answer
209 views

Use custom field as tag slug

I am trying to replace 'tag-slug' with a custom field value, so it will automatically pull the tags that match the custom field 'my-tag-slug' The code below does what I want <?php if ...
0
votes
1answer
117 views

I want to split this into two functions

This code i will add below is for Custom Fields for Custom Post Type and GMap for Custom Post Type. Currently both are pulled by this function. I want to seperate both. One for Custom Fields and One ...
0
votes
1answer
29 views

Custom Fields - How can I remove the publish option for certain users

I am trying to set updates to Pending vs. Publish for a new role I created called "members". Is there a way to remove just the Publish option for these users? None of the user plugins I have tried ...
0
votes
1answer
109 views

custom field suit new post with in custom fields

how can i use Custom Field Suite (CFS) https://uproot.us/ to create new posts in post type. what am trying to do is create a music albums using post then create new post based off the tracks in the ...
0
votes
1answer
457 views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
0
votes
1answer
102 views

Repeatable Custom Field for Media Upload

I am following this topic to add a repeatable custom field for my Custom Post Type, but I cant get it to work for a media upload, Which will allow the author to add multiple image by uploading or ...
0
votes
1answer
58 views

Change event firing in wordpress

I have to run a function when a post is published. The function checks a custom meta value and works accordingly. I am using couple of hooks for this purpose: new_to_publish draft_to_publish ...
0
votes
1answer
184 views

query specific posts according their custom fields, using sql SELECT

My posts have a bunch of custom fields, to help insert and display custom info easily. I am trying to build a search that would select and display posts according values of specific 2 custom fields. ...
0
votes
1answer
66 views

Data URI in custom fields

My theme has an option to specify the thumbnail using custom fields. post_thumbnail - http://domain.com/uploads/xx/xx/mythumbnail.jpg I would like to use data uri instead of the the image in the ...
0
votes
1answer
144 views

Show a custom field instead of username in the backend author area

I'm building a new WP site with about 1200 authors(which are actually companies, pulled from my client's existing site), each attached to at least one custom post type. My problem is the admin(our ...
0
votes
1answer
47 views

Wordpress archives by custom field and date

I have a strange situation on my hand. I want to list my archives based on a custom field (numerical value) but also display something like a cover. We have specific posts in different categories ...
0
votes
1answer
63 views

Meta_query not filtering posts

I'm trying to filter out 'properties' on a page based on whether they are vacation or long-term rentals. Right now, the results of the following query displays all properties, not just either vacation ...
0
votes
1answer
57 views

Decouple page name from page title

As far as I can see, the name of a page (in admin) is the same as the title for the page. In many cases you would want the page name to be something else to better grasp what it's about while ...
0
votes
1answer
35 views

Outputting a custom field in PHP

I am a complete newbie at PHP so please forgive me. I am wanting to display some data in the following format: "Post name" - "Custom Field String (in this case, 'custom_date')" I am currently ...
0
votes
1answer
172 views

Adding thumbnails for non-image attachments

I'm working on a site that provides Photoshop resources. I would like to create a page offering brushes for download that displays a thumbnail image and a link to a .zip file for each brush set. I was ...
0
votes
1answer
28 views

Download stuff after filling fields?

is there a way to restrict a download, but if you fill your details get the file? I need to create a database with the names, mails, companies and phones for the people that want to download a ...
0
votes
1answer
234 views

Filter unique custom field value based on custom taxonomy category or other custom field

Is there an easy way to obtain a list of uniqye custom fields value from a specified taxonomy value? For example, I have many categories under taxonomy "products". Every product has some custom ...
0
votes
1answer
35 views

Custom fields randomly stop working

For some odd reason custom fields keep randomly stop working - they're working one minute, then not the next and i do not understand why. The post, meta names and values are all still active - nothing ...
0
votes
1answer
101 views

Returning website screenshot based on Custom Field

I am trying to return a screenshot from websites using this <img src="<?php echo 'http://s.wordpress.com/mshots/v1/'.urlencode('http://domain.com/').'?w=200' ?>" /> This works fine for ...
0
votes
1answer
221 views

WP_Query based on multiple metadata comparisons

I have created a custom post type with custom fields and I need to filter them based on several meta data values. $args = array( 'post_type' => 'match_report', 'post_status' => ...
0
votes
1answer
61 views

Get multiple posts with some custom fields efficient

Is there an efficient way to get some posts with (some of) their custom fields in one go? I have a custom post with some custom fields and would like to create an overview page where I display all ...
0
votes
1answer
23 views

same custom field for single posts

I have a custom field for my blog page that displays a "custom title" in the header. When i click one of the blog posts on that page the "custom title" isn't there. I would like it to be the same ...
0
votes
1answer
112 views

Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites

I've built two WordPress sites. One is public site--people go to it, view my content, etc. The other site is a private course catalog. In the course catalog I have 3 custom post types. The content of ...
0
votes
1answer
193 views

Get custom field from other post in carousel

Im using a plugin called wp carousel to display custom post types in a carousel in the footer in the singular view of posts. By default the plugin gets the featured image and the title of the post, ...
0
votes
1answer
335 views

Display posts order by custom post in a dropdown menu

In my WordPress backend I have some custom posts and, in one of them, I want to display in a dropdown field some posts related with but ordered by post type. Iwant to display something like this. ...
0
votes
1answer
146 views

ACF Plugin How to make the customer add more fields in the post?

Example: I created a field with the name, "my-field", there can add it on the post, with a button "add another item" is that I want to create a list with several items, we only need to create multiple ...
0
votes
1answer
303 views

How can I change the publish date based on a custom field?

How can I change the publish date based on a custom field? Author uses a date picker to choose the date for journal entry. The date is used to make a list of all the users journal entries. I can ...
0
votes
1answer
31 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
343 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
89 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
210 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
89 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
102 views

Custom Field data only shows after manual post update

I have a custom field [address] that converts a street address and displays it on a google map on the front end post. Upon manual post update, the latitude and longitude address co-ordinates ...
0
votes
1answer
54 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
43 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
239 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
141 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
54 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
157 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
234 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
352 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
134 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
268 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
98 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
92 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
46 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
220 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
89 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
288 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
109 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 ...