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

learn more… | top users | synonyms (2)

0
votes
2answers
468 views

Custom search SQL Query to add custom field in result

I have to write my own MySQL query since I haven't found a good way to do it within wordpress functionality. I want the search query to search trough post_title / post_content & meta_key ...
1
vote
1answer
708 views

get_post_meta unserialize issue - retuns boolean(false)

I´m using a simple custom plugin that parses and saves external XML data as a serialized array in a custom field. This works fine, however, when I update the post, instead of the array I only see a ...
0
votes
1answer
425 views

How to enable revisions for post meta data?

Normally wordpress keeps revision of wp_post table. But for generating a report I need some custom fields to be tracked while any update happens. As custom fields are saved in wp_postmeta table I need ...
0
votes
1answer
16 views

Add custom field to attachments in a specific category

I have a working function that adds a meta field to all attachments (so I can enter the url of a video). I would like this field to populate only on attachments in the "video" category. I've tried ...
0
votes
1answer
1k 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 did find one disadvantage of this guide. When I click the 'Remove' link from the uploaded images, ...
0
votes
1answer
468 views

Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete

I am trying to write a plugin that adds a custom meta field to image attachments to give images a credit field. I use the 'attachment_fields_to_edit' and 'attachment_fields_to_save' filters. ...
0
votes
2answers
469 views

Guest Author - How to display posts on /author/ archive page

I have used the Advanced Custom Fields plugin to create all the data elements for a company leadership directory page and management bio pages. On the site blog, management will not be posting ...
1
vote
0answers
14 views

Change the RSS Publication Date to use a value from a custom field

I have a site that wants to order its RSS output by a date value in a custom field. I'd rather not create a new feed to do it -- how do I override the default feed date value?
2
votes
1answer
1k views

How to filter a dd/mm/yyyy date from a custom field in a query

I'm trying to build a query in order to sort some posts by a date custom field, where the dates are formatted dd/mm/yyyy. It works by querying the database directly with get_results like in this ...
3
votes
2answers
47 views

How to get custom post meta using REST API

I am trying to create a REST APIs for my wordpress website which is used for facility listing using wordpress job manager plugin. I have registered my custom post , taxonomies in ...
0
votes
0answers
16 views

Custom fields for media library images

I want to create custom fields for wordpress admin media images. Can you suggest some plugin or easy way to do that? than i want to get that fields at image.php
0
votes
1answer
26 views

After ajax image is outside the `<a>` tag

I am loading some content via AJAX, and basically I have this line: $storage .= '<a href='.get_permalink($id).'><img src="'.$image['url'].'" /></a>'; Which gets rendered as: ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
0answers
13 views

Table showing data from posts

I have set up a custom post type, with several custom fields to store individual pieces of data. Is there a way to display the data from the posts in a table? Ideally I'd be able to implement search ...
0
votes
1answer
633 views

get posts where a custom field contains a text

I have a custom field where the value contains a comma separated list of items (like: test1,test2,test3), now I want to retrieve posts where the field contains one of the values, I have: $query = ...
2
votes
1answer
74 views

How can i make WP_Query return post image and categories?

I have a sidebar widget that will display related posts based on a custom meta field. The query works, but its very wasteful. All i need is the post title, featured image and the categories of the ...
0
votes
0answers
9 views

How to target page editor fields when using an import plugin?

I currently have a need to create many pages that only differ by a small amount, so I figured I search for a plugin that can allow me to import multiple pages that I'll create in Excel and save as a ...
-1
votes
0answers
23 views

Updating post meta key value not working properly

I'm trying to update a custom field but when I do so it doesn't update correctly. For instance when I type random numbers like 56897, it will only update to 1 number, so it will just become a "5" in ...
7
votes
5answers
7k views

Is there a way to set default custom fields when creating a post?

When I'm creating a new post, just after clicking "Add New", when the post editor shows, instead of having to use the dropdown and choose a custom field to use, I'd like to have some default custom ...
0
votes
1answer
12 views

Add commentmeta custom field to every published comment with SQL

I am trying to add custom commentmeta "likes" with 0 as default value to every posted comment. I have this query but I dont see any error there, but still it doesnt work. Can anyone help me to solve ...
2
votes
1answer
631 views

How to put enctype=“multipart/form-data” in categories form?

I had success putting the code below to include enctype (for images) in custom post type forms, but I'm not able to use it in categories form... is this possible? Thanks. add_action( ...
1
vote
2answers
2k views

Getting Custom Fields from WordPress JSON API

I'm using the plugin (https://github.com/WP-API/WP-API) to get JSON Data from WordPress, but I'm stuck on something, I've a custom post type, events, with which many custom fields is attached to, such ...
1
vote
1answer
957 views

Auto Populate Custom Field with Complex Value That Increase by One?

Can somebody help me to sort this? I am using WP 3.5.2 and I have "Orders" post type where purchase_order custom field is located. This is the sample of purchase order record: POCOS20130051 PO - ...
0
votes
0answers
16 views

Query Posts by post_meta using WP_Query (data saved as array with keys)

I am working on some project where i need to create class (like karate etc...). My question is, how can i work with WP_Query to Query all the posts by post_meta where the key "day" is "1" for ...
0
votes
0answers
7 views

how to display a sidebar widget based on a dynamic custom field?

I used to manually assign a sidebar to a post based on a custom field using the following code in the sidebar global $wp_query; $postid = $wp_query->post->ID; $sidebar = get_post_meta($postid, ...
-1
votes
0answers
19 views

Addvance Custom Field Not show properly on upload page [on hold]

I am new in WordPress.I tried to make a page as show in my image.I am using theme through which I am not able to add custom fields on my page.How can I add Custom field on my upload Page.
0
votes
1answer
748 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 ...
3
votes
3answers
7k views

Get value in custom field with taxonomy [closed]

I have custom field my_cf for Taxonomy/Term. How can I get and output value with custom field for taxonomy/term? I've tried using: $variable = get_field('my_cf', 'basic'); echo $variable; ...
0
votes
0answers
18 views

Content by location - custom meta OR Multisite

I'm looking at organising content by location for a client, initially just two cites, but moving on to three in the future. The client has a LOT of content for one location already. Is it better to ...
1
vote
1answer
36 views

delete custom post based on custom field date

RESOLVED ## updated code below. I had created custom post type called 'esitykset' and I wanted to delete them if they are older that the date in 'show_date' custom field of the post. So I tried the ...
3
votes
4answers
983 views

How I check if the same post slug has not been used before publishing?

For an indie rock agenda I created event posts. With the help of javascript, the custom fields values (bands, places and date info picked in select boxes) are copied as the post title when publishing ...
4
votes
2answers
771 views

How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?

I know the question is quite ambiguous. Let me explain: I have a page that lists all posts with a certain value of a custom field. (Eg.: The page Rentals lists all posts with the value rental of ...
0
votes
2answers
717 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 ...
-1
votes
1answer
21 views

Filter Query Post by Custom Fields(by date)

I want to filter query_post using the 2 meta keys start_date and end_date, i want to get my posts to divide it by upcoming events and past events. start_date and end_date is stored in the timestamp ...
2
votes
0answers
43 views

Download external images with function

Actually, i display images on my site from other sites. Url is on a custom field name "couv" I'd like to download theses pictures on my site and create a new custom field with the new value "couv2" I ...
1
vote
2answers
48 views

Get Meta from Custom Field of Image URL

I have a custom field that is an Image and the return value of the field is Image URL. I have custom page templates where I render these image fields. Is there a way to get the meta info for the ...
0
votes
2answers
1k views

Build Array from Input Fields question

I have a series of input fields sets: <input type="text" name="people[name]" /> <input type="text" name="people[lastname]" /> <input type="text" name="people[email]" /> <input ...
1
vote
2answers
2k 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
21 views

Saved Post Meta Array Returns as String

I am saving an array in post meta using update_post_meta. $arr = array('this', 'or that'); update_post_meta($post_id, 'field', $arr); $ret_arr = get_post_meta($post_id, 'field', true); ...
1
vote
0answers
20 views

SQL Query to copy value of a meta_key into another meta_key

I am trying to figure out how to replace the value of one advanced custom field with the value from a different custom field. Would anyone be able to help me structure a SQL query that will do this ...
1
vote
1answer
22 views

How can I show custom fields in the loop only to specific user roles?

I've inserted this code in the loop (in single.php): <span style="font-size:16px"> <strong>Currently reading:</strong> <?php the_field('book_name'); ?> (<?php ...
2
votes
0answers
33 views

Using a custom field value to redirect away from a 404 page

I’m moving from an old CMS to WordPress. The old articles are saved as posts and the new WordPress permalink is %post-id%. The old URL slug is unique and saved as a custom field for each post; the ...
0
votes
1answer
55 views

WP REST API - get custom taxonomies based on terms & filter

I need to get the list of data's with taxonomy term property_category,based on this property_category having data's like apartment,house,office etc.For example localhost url given ...
2
votes
3answers
3k views

Getting Bootstrap accordion working in Wordpress loop with custom post type (collapsing issue)

First off I am well aware that there is a plugin but I am NOT talking about the BS Short code plugin. I am talking about the actual bootstrap accordion. So here is what I am trying to accomplish, I am ...
-1
votes
0answers
16 views

create admin page with custom fields

I have a Custom Post Type "Special-Sales" to show a couple of products. Each products shows up to 20 product features. Those features are taken out of all available product features. This are stored ...
0
votes
1answer
10 views

remove initial wysiwyg editor from cms page edit

So I have successfully installed and implemented the Advanced Custom Fields plugin from: https://www.advancedcustomfields.com/ I have applied a set of custom fields to a custom page template, ...
0
votes
1answer
41 views

Sorting custom post type columns with external data and without meta values

I created a custom post type 'Book', for which data is stored in an external database (like ISBN, author etc). The WordPress database contains the ISBN per custom post, which connects the correct data ...
0
votes
1answer
20 views

How to add content with a filter when there's no content in the editor

I'm building a plugin to create page sections (with ACF and repeater field) and I want to add the sections at the end of the content. The sections are added to the content, but only when there's ...
1
vote
2answers
906 views

Send Multiple Custom Field Values Through the URL

Basically, I'm trying to follow this tutorial to add an action to the pre_get_posts and create a custom meta_query so I can alter the query within the URL and display babies,children and home books ...
0
votes
3answers
607 views

Order by a meta field in query loop

I would like to sort my article from a category by a number added in a meta field. Here is the first step, I get the articles to display on the page. <?php $cat = get_post_meta( get_the_ID(), ...