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

Adding an extra parameter [string] to my posts' permalink?

I've been searching the internet for 6 hours now, so I decided to ask this in the forum and would appreciate every help. I just want my permalink to say (e.g. portfolio, post, etc) http://mysite.com/...
0
votes
0answers
21 views

Turn Custom Post Title into external link [duplicate]

I created a Custom Post Type called News, which supports Title, Editor, Thumbnail and Custom Fields. One of the Custom Fields is URL. What I need now is to turn the Title in a external link in the ...
0
votes
1answer
43 views

How to use a custom field for search engine optimization

My posts (not custom) have a custom field - this has very important information. Can I use this information to submit to search engines. Note: This is something like a product site and has many ...
1
vote
0answers
2k views

Integrate Custom Post Type Events into Calendar

I've got a custom post type called Events on my site with a custom field called event_date created via Advanced Custom fields that stores its value in yymmdd format. Everything works just fine and I'm ...
0
votes
1answer
173 views

Displaying information from custom field on custom post type

I have videos set up as a custom post type and music, commercial, promo set up as categories within this post type: I have a function that displays a custom meta box on the videos post type pages in ...
0
votes
1answer
414 views

Plugin or shortcode for ISBN number?

I have a Woocommerce site with a catalogue of books. Each book has an ISBN (or EAN) number entered in a custom field. I need to do two things with the ISBN, and I don't want to have to manually ...
1
vote
2answers
1k views

How do I search an array stored in a custom-field using WP_Query?

I have a custom post type called "on-air" that included a custom-field called "daysonair". The form for this has checkboxes for each day of the week. When you add/update a post, the checked items ...
0
votes
2answers
80 views

How can I create more “create attachment” custom field - any idea?

define('MY_POST_TYPE', 'myslider'); define('MY_POST_SLUG', 'myslider'); function my_register_post_type () { $args = array ( 'label' => 'Gallery', 'supports' => array( '...
0
votes
0answers
1k views

add custom fields in custom taxonomy meta box in wordpress-3.5.2

Unable to add custom fields in custom taxonomy meta box in wordpress-3.5.2. I have checked solution in various blogs but Unable to solved this problem. I am using wordpress-3.5.2 What I am trying is ...
0
votes
1answer
288 views

delete duplicate meta_value with same post_id

I've trying to cut down on the time to query a custom post type. After looking at the database and the wp_postmeta table, for some reason, there is some duplicate meta values for the same post_id and ...
0
votes
0answers
108 views

Course listing with multiple dates

I'm trying to build a course listing (custom post type) - each course has multiple dates assigned to it, but I'm failing miserably (mainly due to my poor PHP skills!). I'm trying to use standard ...
1
vote
1answer
672 views

Custom tables or custom fields?

I'm building blog where users ll have option to download images. I want to display information how many times post have been displayed and how many times the image have been downloaded. Technically I ...
0
votes
2answers
60 views

If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?

One custom post type that i've created has 5 custom fields that display specific content for a template that displays them in different areas on the page. My question is if i would have to create ...
1
vote
1answer
134 views

How to structure a site with product variations pages?

I'm doing a website for a friend for his trailer business (riveting I know!), and was looking for some advice on how to build it out. Basically there are a few major types of trailers, then each main ...
0
votes
1answer
128 views

Copy url from post_content to custom field

I'm new to MySQL so I don't know if this is even possible. I would like to copy a url that's in post_content to a custom field. The url is variable and it looks like this: [audio:http://www.website....
2
votes
1answer
98 views

all tincymce's switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something ...
2
votes
3answers
654 views

Loading scripts to the Post Edit page only

I have added a few meta boxes for the posts and pages, so I want to load a js script only on the Create/Edit post and page. How can I do that? Currently I'm using following but that loads the scripts ...
0
votes
1answer
104 views

Fetch data from a WP page with same name as current username

Ok, so this sounds a little complex, but in theory should be easy. What I'm trying to achieve: ACF data is pulled from a WP page which has the same name as the current logged in user. Basically I ...
0
votes
1answer
155 views

Getting content from custom fields of different pages on a single page

I want to get content from one custom field of different pages along side their page titles and I'm using the following code: <?php $mypages = get_pages( array( 'sort_order' => 'ASC', ...
1
vote
0answers
113 views

Possible to filter custom post type with multiple meta data?

I'm wondering if it's possible in one loop to accomplish what I need to do. What I would like is to sort all custom post types by the meta data of county and put them in order which it is doing here. ...
1
vote
1answer
665 views

Collect user custom field in product page woocommerce

I have a custom user field named "weight" and I need to collect this information in woo product page. How can I do that?
0
votes
1answer
987 views

Adding custom url to readmore link using get_permalink()

I am having issues with a custom url. I have a page with a gallery type plugin/shortcode. Now each gallery item displayed on the page, has a readmore link, linking to that gallery item post. Now I ...
3
votes
2answers
15k views

How to display value of custom fields in page

I have a custom post type called 'software', contained within are various custom fields such as subtitle, price, screenshots, download link, etc. I created a function to allow use of the tinyMCE edit ...
0
votes
1answer
503 views

Custom post metadata not appearing in public API

I'm using wordpress.com's public REST API to retrieve custom posts from a Wordpress installation. The JSON that's being returned is missing all the custom fields, however. The fields are definitely ...
-1
votes
2answers
2k 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 ...
0
votes
1answer
1k views

Multiple single templates?

Lets say i have a custom post type called 'event' that has several custom meta boxes for images, docs, etc.. Would it be possible to have two different single templates? For example: i have a page ...
0
votes
0answers
32 views

How to Pull Out Twitter Summary Data in other areas of my template?

I am curious on how www.gigaom.com is able to callout the summary data of their articles. In addition I am trying to figure out how the summary autoposts when you select the tweet this button and the ...
0
votes
1answer
697 views

saving/reading custom field value does not work - no value gets POSTed

I am trying to add a custom field to all my posts and of course saving/reading the value. As a starting point I took the example from the Wordpress Codex and stripped it down to bare bones. I know it ...
0
votes
1answer
249 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
2answers
417 views

WP Insert post with post_thumbnail

Insert post thumbnail with 'wp_insert_post', i'm trying this code but does not work, the field 'get_field('imagem_do_produto') returns the url of the image, why not work? <?php $exists = ...
0
votes
2answers
748 views

Custom Taxonomy dont save in a frontend form for post a custom post

I have a Dropdown Categories .. <?php wp_dropdown_categories('taxonomy=faenas_combenef_category&hide_empty=0&orderby=name&order=asc&name=location') ?> And my post Process... ...
3
votes
0answers
101 views

How can I append custom data to images in the editor?

I've added a custom meta field to my image details so that a client can add a number to their photos (a design choice). The data would need to show up under each image (like a caption) inserted into ...
1
vote
1answer
564 views

WP_User_Query pulling ACF to loop

I'm using following code to display my users on template <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $paged -= 1; $limit = 100; $offset = $paged * $limit; $args = ...
0
votes
2answers
221 views

Insert posting automatically based in acf field

good day I found a code that works, but it creates several posts of the same name, do not want that, he wanted to create only once post_type if the value is 'x', but he is creating a 'x' every time ...
0
votes
0answers
186 views

convert Custom Fields Option-Values to Tags/Taxonomy

I have Custom Post Type "Places". In that I have Created Custom Fields. Like: Option Title » Type of Pub Option values » Sports, Rock, Biker, Beer, Live Band, Restro, Gastro, Irish, ...
0
votes
0answers
54 views

Make each Value of custom field show related posts when clicked

i have create a Custom Post Type calle "Places". I have created a Custom Field with Field Type "Multi CheckBox" Option Title "Type of Pub" Option values "Sports, Rock, Biker, Beer, Live Band, Restro, ...
0
votes
2answers
99 views

How to display Multi Checkbos select Custom Field on the post?

i have create a Custom Post Type calle "Places". I have created a Custom Field with Field Type "Multi CheckBox" Option Title "Type of Pub" Option values "Sports, Rock, Biker, Beer, Live Band, Restro,...
0
votes
1answer
125 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
442 views

Add Extra Category Field to CPT Categories

So I'm able to add an extra field to my categories (A Color picker actually, to color code categories - pretty cool stuff if anybody is interested) but the extra field ONLY shows up under Posts. I ...
1
vote
2answers
2k views

Filter archive.php by custom meta

I"m trying to filter an archive page by custom meta query. I've tried using query_posts($args) prior to the loop, but it returns nothing. Any ideas? Here's what I have so far: <?php //$...
0
votes
2answers
2k views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
1answer
139 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
28 views

help for user login

please help, I have to restrict some users based on the value of some metadata.for eg:if the account is not verified by admin(a metafield like "adminveri" will be zero), then the user should not login....
0
votes
1answer
595 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
0answers
58 views

Analyze uploaded images to get colour values

I have a site that uses large background images, uploaded by the user, that has content on top of it. I'd like to be able to analyze the image and apply a class to the body that will have black text ...
0
votes
2answers
201 views

Can i categorise my meta box?

I have this code <?php $prefix = 'wtf_'; $meta_box = array( 'id' => 'propertybox', 'title' => 'Property listing details', 'page' => 'listings', 'context' => 'normal', ...
0
votes
0answers
81 views

What is the best way to sort posts by a custom algorithm?

I'm wondering what is the best way to sort posts on homepage using a small algorithm like custom_field_votes / ( post_hours_old + 2 ) ^ 1.8 I have tried creating a new custom field with the result ...
0
votes
2answers
462 views

Wordpress custom upload field error

I'm creating a custom upload field for a wordpress theme that uploads pdf files.The code is: function custom_news_meta_box($post) { $file_name = get_post_meta($post->ID, 'file_name', true); ...
0
votes
2answers
484 views

How to Wrote Simple Calculations by Using Custom Fields in Loop?

I am building a website with whole bunch of custom fields and need to implement several custom fields that will auto calculate values by using values from other custom fields. All files which I need ...