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

learn more… | top users | synonyms (2)

0
votes
0answers
8 views

Add custom field to post with some part of url as value

I wish to move my site from some other CMS to WP. There is no any usefull migration, export option in my current CMS so I will need to create posts again manually. I will to transfer important fields ...
0
votes
1answer
15 views

Add custom objects/entities to Wordpress

(I have some experience creating Wordpress themes but no experience in extending Wordpress functionality. I'm sure this must be a very common question, but I don't know how to search for the answer. ...
0
votes
0answers
12 views

WP_Query Meta_key is text value and need to sort as numeric not working

I have the following code below in my ~WP_Query`. $args[ 'meta_key'] = 'price'; $args['orderby'] = 'meta_value meta_value_num'; $args['order'] = 'ASC'; The custom field in question has historic ...
0
votes
0answers
9 views

User field and access post

I’ve create two custom post type (all'code here). I use the ACF Plugin to create custom post and 've create a relationship user field with the field name "sleziona_cliente". I create a cpt post and ...
0
votes
0answers
18 views

Create hierarchical menu for custom taxonomy meta field

I've created a custom fields for a custom taxonomy. All works fine so far, I can save, edit and display these fields. Now I want to display these fields in the admin menu as a hierarchical menu like ...
0
votes
0answers
5 views

Adding custom ID to woocommerce checkout fields [on hold]

I am building a new site in woo and a little stuck, basically the client wants to be able to add custom fields to the checkout (done) but they need to be in a repeatable field so the customer can add ...
0
votes
0answers
13 views

Category name from custom fields

I have a problem with getting category name. I was trying a few versions of code and I don't have any idea how to run it correctly. I have custom field (field type - taxonomy-category/ ...
0
votes
0answers
9 views

How to add download to post & more?

What is the correct way of adding downloadable content to posts? More complex situation: I have a portfolio, and sometimes I do stuff that is meant to be freebie and I want it to be downloadable. ...
0
votes
1answer
56 views

Custom post types category

I have created a theme with a custom post type called 'project' and there is a problem. I want to show 5 different custom post type categories on a page in different portions, like posts to show on ...
1
vote
1answer
33 views

How do you create dynamic customised sections in Wordpress?

I am very new to Wordpress and I just like to ask a fundamental question about its structure. I understand that Wordpress uses different files as templates for different sections or types of pages. ...
0
votes
0answers
13 views

How to save meta box check box values and show them on a post?

I added this codes on my child theme functions.php add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'My First Meta Box', ...
0
votes
1answer
19 views

How to use conditional statement with custom field

I think it is a simple thing but I am not good on php so :( can you guys tell me how I can use an if condition with my custom filed. Below is my current code. <div class="courtesy"><?php ...
0
votes
0answers
12 views

Category custom fields - checkbox not updating

/* ** Category custom fields */ add_action ( 'edit_category_form_fields', 'extra_category_fields'); function extra_category_fields($tag) { $t_id = $tag->term_id; $cat_meta = ...
0
votes
0answers
16 views

Repeatable fields second input [closed]

Hi Im trying to add a second input field for "Repeatable Fields"? Example: [Song Title] - URL: [MP3 URL] But I gt this error "Parse error: syntax error, unexpected '<'" array( ...
0
votes
1answer
25 views

Paying to Access Custom Fields Per Post

I need a way to protect access to custom fields within my posts. I've been looking at several plugs ins, but none seem quite right. I do not need to protect the body of my post, just a set of custom ...
0
votes
0answers
11 views

Creating a filter to modify links ending in .pdf

I'm trying to create a filter that checks for links that are to PDFs, and append the href attribute with something like /form?file=[path to pdf]. For example, starting with: <a ...
0
votes
1answer
15 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 = ...
0
votes
1answer
19 views

Sorting posts by Multiple custom fields in defined order

I'm currently sorting some posts out by custom fields 'role' and 'surname', using the following: function customorder($orderby) { return 'mt1.meta_value DESC, mt2.meta_value ASC'; } $args = ...
0
votes
1answer
38 views

Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page

I have already published this on StackOverflow, but I realised it would be better to post it here instead. I am using the CMB script (Custom Meta Boxes and Fields for WordPress) for uploading files ...
0
votes
0answers
16 views

Custom Field, add gallery id

Is it possible to add a gallery id like [gallery ids="9"] to custom field using the media editor in wordpress? I have attached a media function to a specific custom field but are not able to insert ...
1
vote
0answers
22 views

frontend image post uploader

I've set up image uploader on front end custom form for users with some text input, textareas etc .Everything works fine, untill I decide don't upload any image. Then my "thank you" page gets blank. ...
0
votes
0answers
11 views

How can I put a custom field value that needs to be inside the loop, in a custom menu via functions.php?

How can I put a custom field value that needs to be inside the loop, in a custom menu via functions.php?? I'm working on a bilingual website and I'm using the Bilingual Linker plugin. I was able to ...
0
votes
1answer
16 views

Is there a way to dump all registered sidebar/widget?

I need to know the properties of sidebar and widgets I've added, is there a way to dump those? Thanks.
0
votes
0answers
6 views

Incoming URL variables to custom metabox

Is it possible to take values from an incoming URL variable and write it to a custom meta box? My client has something like the following for a URL (marketing purposes): ...
0
votes
2answers
22 views

How to exclude post from being queried based on custom meta value

I am building a reviewing system for user-submitted posts on my website. I have a page called page-review.php which displays the oldest post of the "pending review" category. This is to ensure that ...
0
votes
2answers
23 views

Order Custom Posts by Several Fields

I have a page that lists out the members of our band, as a custom post type. I am trying to order the members by several custom fields, field by category, or "section, then by their class, and then ...
1
vote
0answers
34 views

Custom Field to a Role?

Is it possible to add custom field to a custom role? Say I want to create roles that represent a membership level and want to add billing options to it. So it'd look like this: Membership level ...
0
votes
1answer
46 views

How to diplay a div only if at least one author custom profile field is filled?

I try to build a small plugin that adds few social profile fields to WordPress user form and display their social icons to the author meta box on single post. The problem I face is as follow: The ...
0
votes
1answer
15 views

Why am I getting a “Call to member function format() on a non-object” error?

I am trying to add a hook to post saving using WP Frontend User When the form saves and the post is created within the "save_post" function I am trying to find the value of a custom field ...
0
votes
1answer
19 views

Display Multiple Values of Same Key

I am going to put multiple value on custom field using same key (my key is link). So the value will be value A and value B And heres my custom field code for single value: <a href="<?php ...
0
votes
1answer
36 views

Set custom field value when reaching expiration date

I had the idea to make sticky posts expire after a certain period of time. FYI, I am using a custom post type along with custom field suite and created sticky posts by creating a boolean custom ...
0
votes
1answer
27 views

$args Orderby The number

I have this code $cat_args=array( 'include' => '42,210,21', 'orderby' => '42,210,21', 'order' => 'asc' ); $categories=get_categories($cat_args); foreach($categories as $category) { ...
0
votes
1answer
27 views

Custom Search Query – include only custom fields and title

I have a custom post type and I also need a custom search. I want the post title and two custom fields to be indexed/queried. I found solutions for title only and for custom fields but not for both so ...
0
votes
2answers
58 views

List of users that clicked a 'Join' button at single post

The title might be a bit vague while I'm not quite sure how to describe it. What I want: At every single post (in this case of post type 'event') a logged in user must be able to click a 'Join' ...
0
votes
0answers
31 views

Multiple meta data one label

I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have, function ...
0
votes
1answer
19 views

Custom field php

Hi I put this php code on my single post php <?php $custom_fields = get_post_meta($post_id); $my_custom_field = $custom_fields['_source_link']; //key name foreach ( $my_custom_field as $key => ...
0
votes
1answer
31 views

Get custom fields when hover link of post

I have custom page and get some links of post if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <li><a href="<?php ...
1
vote
1answer
51 views

Styling Taxonomy Terms Individually

I am trying to solve a problem and need help :) First, I have a custom grid displaying terms and images from my custom taxonomy. This is the code I'm using currently: <?php $terms = get_terms( ...
0
votes
1answer
26 views

do_shortcode close

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes: [vr_jsp] [/vr_jsp] I have two different custom ...
-1
votes
1answer
29 views

Custom fields doesnt work well with any postTAB plugin

Here is my problem: I tried to implement custom fields (text) within a post tab. I tried many post tab plugins and the imlementation to template was succesfull... Unfortunately, the content of the ...
0
votes
1answer
40 views

Filter and display a specific custom field value [closed]

I am developing a travel website for an agency. I'm trying to to make the user able to select an option like "Select your departure" and filter the loop with all the departures available for the ...
1
vote
1answer
20 views

Linking Custom Fields to Database Records

Hey there im fairly new to wordpress and php, but have a strong programming/database background. I recently learned about custom fields and am wondering if it is at all possible to do the following ...
0
votes
1answer
32 views

Hide a div when a custom field is empty

I am having trouble hiding a div when the input of a custom field is empty. This is the code I am using but can not seem to get it to work. The field that displays the content is _cmb_fe_wysiwyg ...
0
votes
1answer
26 views

one get_posts to return a number of custom posts for each meta value

I have setup a custom post 'product' with a custom field cf_type. I wish to have one get_posts that will return 20 total products, 10 products with cf_type: fog and 10 with cf_type: gof. Is that ...
0
votes
0answers
17 views

Custom field with subdomain

I am currently having a problem related to the display of custom field article is "language" Specifically as follows: I have a blog with multiple applications for mobile phones, as this blog ...
0
votes
1answer
34 views

WP_query returns error when used for custom widget

I was working on creating my first plugin/widget that should display a really simple loop containing only a custom field (image) I've been testing the loop without any problems in my theme but when I ...
0
votes
1answer
43 views

Show Custom Post Type taxonomy term that matches custom field

Not sure how well I can explain this but I will try. I have two Custom Post Types. One is "Locations" and one is "Members." I need to show only the members that belong to the location. "Locations" has ...
1
vote
1answer
20 views

WordPress Custom Field Should be Unique. Is it possible?

I have a custom field called "website_url". It should be unique. Ex: If a author set "http://wordpress.stackexchange.com/questions/ask" as the custom field value as a post, ...
6
votes
3answers
328 views

Adding custom input for data attribute in insert media modal

I'm trying to add a text input to the "Insert Media" modal in the hopes of being able to add an html5 data- attribute to the images' parent anchor. <a class="fancybox" href="..." ...
0
votes
0answers
12 views

Only display custom fields that are associated with template

I am in a predicament where I have entirely too many custom fields displaying in my admin. Ideally I would like to filter through all custom fields created for my site and only display the ones ...