This is great plugin. I was wondering if there’s any plans to add the ability to do quick-and-dirty editing of the custom field values?
If not, is there any other plugin that you could point me towards?
Thank you kindly!
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Okay, here is the question also a suggestion:
When creating custom fields, I am including it on All Pages, but at some point I don’t want to show the fields on a specific template, instead of the page ID. Is this possible? The reason is because I have similar fields created for specific template so it gets confusing later.
Here is what I wish SLT did in the scope setting:
‘scope’ => array( ‘page’, ‘except_template’=> ‘template-example.php’)
Let me know if this makes sense and also I think would be nice to have if you dont ??
Thank you
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Just started to use your plugin. Registering fields with a custom post type works fine, but I can’t figure out how to apply fields to a custom taxonomy’s admin page. I thought it would possibly work with ‘'scope' => array('name_of_custom_taxonomy')‘
. I have read through your documentation but couldn’t find a solution. Any advise/help very much appreciated.
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Again, another plugin that offers no interface or menu icon. Where do I create the fields?!
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Hello dear Developer’s Custom Fields developer,
I have a gym site and I have to make a personal page for each customer with his bodyweight chart/table that will filled by our staff (look this image). User will be able to hide that data from others.
How can I make it with your plugin?
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Hi Steve
Me again. Any idea if the values stored as an array (e.g. entered via a checkbox group) behave any differently in this plugin? If not, then it’s possibly my WordPress knowledge that’s lacking but either way, any idea how to use array values in a meta_query? i.e. as part of the args for a get_posts or WP_Query?
E.g. Here’s what I’m working with (the $args list is longer so have just included the relevant part):
$args = array(
‘meta_query’ => array(
array(
‘key’ => ‘_slt_client_by_year’,
‘value’ => ‘2010’, // the values saved are 2010, 2011 etc
‘compare’ => ‘IN’,
)
)
Essentially I’m trying to find out whether the year e.g. 2010 is one of the values saved in the custom field _slt_client_by_year
The meta_query certainly works with non-array values (by using compare=>”=”) but so far no success searching for a value within an array.
Hope I’ve explained that clearly enough.
Thanks for your help
Tim
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Steve or anyone else –
Is it me or, is the Toolbar toggle” icon missing on the WYSIWYG editor for extra fields? i.e. the icon which enables you to have 2 rows of icons instead of just 1.
If so, anyone know how to enable it?
The option specifically that I’m missing is the dropdown that allows you to mark-up headings without coding.
Thanks-
Tim
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Hello.
I had installed WPMarketplace, and created some custom fields. Administrator see this, Contributor not.
What can I do, what permission or capabilities can I set?
Best regards,
Vladimir.
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Fantastic plugin –?if I’ve not said so already.
I’ve got a situation where by I’m using a select input with several sets of posts from different post types as its options. Can anyone shed any light on the possibility of adding dividing optgroup labels in the select to help with readability and usability. Its currently a little unwieldy.
The only way I can think of doing this is to do the loops for each post type separately. Not sure where to do this within the plugin, but it certainly seems like a change to the plugin rather than an addition.
I’d be interested to hear any opinions on alternatives as well.
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Hi,
Sorry if this is in the docs but I can’t find it.
Is it possible to loop through all slt custom fields and retrieve their keys as well as their values?
This function, I think, only retrieves the values of the fields: slt_cf_all_field_values()
I would like to do two things:
(1) Retrieve a list of the keys on their own (to output in a list)
(2) Retrieve the keys at the same time as the values so I can assign them a css classname
Even better would be able to retrieve the human readable ‘label’ as assigned when the fields are registered, which labels the fields at the back end. Can these be retrieved at the front end?
Many thanks
Tim
https://www.ads-software.com/plugins/developers-custom-fields/
]]>Hello
A while ago Steve mentioned (in the context of having repeatable fields) that it should be possible to dynamically generate the fields
array in slt_cf_register_box()
from a for
loop – to create a given number of meta boxes without having to write them all out. I’ve been trying to do this but failing! Any chance you could point me in the right direction?
So, for example, if I wanted to generate 15 sets of title/text in a box:
$fields = array();
for ($i=0; $i <= 15; $i++) {
$fields[] =
array(
'name' => 'title_'.$i,
'label' => 'Title '.$i,
'type' => 'text',
'scope' => array( 'page', 'project', 'except_posts' => array( 4, 45 ) ),
'capabilities' => array( 'edit_posts' )
),
array(
'name' => 'text_'.$i,
'label' => 'Text '.$i,
'type' => 'textarea',
'autop' => 'true',
'scope' => array( 'page', 'project', 'except_posts' => array( 4, 45 ) ),
'capabilities' => array( 'edit_posts' )
)
};
slt_cf_register_box( array(
'type' => 'post',
'title' => 'Process Map',
'id' => 'process_map',
'context' => 'normal',
'priority' => 'high',
'fields' => $fields
));
Thanks!
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Just wondering if there is way to include the fields on pages also? If not can you give lead me in the direction to edit this plugin to do that as well? Would be nice to have both posts and pages for this plugin. Would rather use this for everything instead of using this and another class to add custom fields to pages.
Thanks
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>This is how you can add this plugin included in your theme if you want. You must change the slt-cf-init.php file and change the plug_url to get_template_directory_uri() . '/folder-name/developers-custom-fields/js/slt-cf-admin.js' );
for each of the files it requires to load. I have been using this and it works fine. This is way I included it. I am not saying that it will never break or that this is the perfect way for including it in your theme so be advised. When I have time I will look into editing this a bit so that it can be included in a better way. Plugin is great though and I really like it.
So remember change the plugin_url because plugin_url is how you would include it in plugin form. So to included it in template form you have to change this. Here is a full example but I put mine in my inc folder. You do not have to included it in this folder. This was how I preferred to include mine.
/* Initialize
***************************************************************************************/
// Global initialization
function slt_cf_init() {
global $slt_custom_fields;
// Globals still to initialize (ones that use core functions with filters that aren't exposed if run earlier)
$slt_custom_fields['ui_css_url'] = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/jquery-ui/smoothness/jquery-ui-1.8.16.custom.css' );
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG )
$slt_custom_fields['css_url'] = ( get_template_directory_uri() . '/inc/developers-custom-fields/css/slt-cf-admin.css' );
else
$slt_custom_fields['css_url'] = ( get_template_directory_uri() . '/inc/developers-custom-fields/css/slt-cf-admin.min.css' );
// Register scripts and styles
wp_register_style( 'slt-cf-styles', $slt_custom_fields['css_url'] );
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
$slt_js_admin = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-admin.js' );
$slt_js_file_select = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-file-select.js' );
$slt_js_gmaps = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-gmaps.js' );
} else {
$slt_js_admin = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-admin.min.js' );
$slt_js_file_select = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-file-select.min.js' );
$slt_js_gmaps = ( get_template_directory_uri() . '/inc/developers-custom-fields/js/slt-cf-gmaps.min.js' );
}
wp_register_script( 'slt-cf-scripts', $slt_js_admin, array( 'jquery' ), SLT_CF_VERSION );
if ( ! SLT_CF_WP_IS_GTE_3_3 ) {
// Register jQuery UI Datepicker for below WP 3.3
wp_register_script( 'jquery-ui-datepicker', ( get_template_directory_uri() . '/inc/developers-custom-fields/js/jquery-ui/jquery-ui-1.8.16.custom.min.js' ), array( 'jquery-ui-core' ), '1.8.16', true );
}
in your text editor line 3 to 32 of the code is all you change.
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>I don’t know if this is a plugin glitch or if I’m configuring things wrong. I’m using the code below as an init in functions.php for an image uploader field one a page that uses the page-template.php
template:
array(
'name' => 'fbdefaultimage',
'label' => 'Facebook Default Image - <em>image can be up to to 300px width 300px height</em>',
'type' => 'file',
'scope' => array( 'template' => array( 'page-hometemplate.php' ) ),
'capabilities' => array( 'edit_posts' ),
),
and that works, and then I’m calling the image this way in header.php:
<?php $imageid = slt_cf_field_value("headerimage");?>
<img src="<?php echo wp_get_attachment_url( $imageid ); ?>">
But the image will only appear with the home page that uses page-hometemplate.php.
On any other page templates, the value is empty. And if I get rid of the scope call, the image uploader appears in all page editors. How do I call the field value in the function above so the image appears no matter what page template is being used by the front end page but the uploader box only appears in the editor of a page that uses that template? Thanks….
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi there,
We’ve configured DCF with WordPress 3.5 to add some additional fields to the ‘user’ post type. When retrieving the values via slt_cf_all_field_values() the function is generating a PHP notice:
“get_user_metavalues is deprecated since version 3.3 with no alternative available.”
The function otherwise appears to fetch the custom fields with no problems.
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi
Im using the “file” type with the slt_cf_register_box method. Whilst this functions I realised that the normal “Title”, “Alternative Text”, “Caption”, “Description” fields that you get when uploading an image are not present in the wordpress media gui when the window is used via this feature of DCF.
Can someone confirm if I can make them appear as its rather annoying as currently users select and upload a file and then have to go to the media area of the CMS to then apply custom values to these fields.
Thanks for your time
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>The latest version breaks javascript throughout the WordPress admin panel.
Turning the plugin off immediately resolves the problem.
Has anyone else experienced this?
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Is it possible to have multiple images in a file field? If so, how? If not, can we have it please! ??
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>I cannot get custom fields to be added to posts or users at all.
After a bit of analysis, I can see that the $slt_custom_fields[‘boxes’] array is correctly populated within the slt_cf_register_box() function.
When the slt_cf_display_post() function is later called by wordpress, the $slt_custom_fields[‘boxes’] array contains zero elements. It’s being reset somehow.
This is on WordPress 3.4.1
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>When adding a new post to a custom post type, some of the developer custom fields I had defined were throwing errors (note, I have wp_debug set to true). I traced the error and found that when adding a new post, i.e. it does not have an ID yet, property_exists($post, ‘ID’) coughs up the following error.
Warning: First parameter must either be an object or the name of an existing class in *domain*/wp-content/plugins/developers-custom-fields/slt-cf-init.php on line 455
I changed the property_exists function to isset($post->ID) and it seems to be solved. I don’t know if this is better, worse, or a wash, but I have stopped the errors.
Edited to add: This is located in the slt-cf-init.php file.
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi guys,
I’m trying to get the ID of the post being edited from within the register_my_custom_fields function, and having tried a number of different methods I’ve hit a brick wall.
I’ve tried…
global $post; $post_id = $post->ID;
global $post; $post_id = ($post_id)?($post_id):($post->ID);
global $wp_query; $post_id = $wp_query->post->ID;
$post_id = the_ID();
But as I said before, its always blank.
The reason for wanting the ID at this stage is so I can check on the value of other meta fields and show additional fields in response.
Any ideas?
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hey there, I’m seeing this error on the My Profile screen:
Warning: First parameter must either be an object or the name of an existing class in /Users/jonahwest/Sites/cococello/sites/the-photo-society/www/wp-content/plugins/developers-custom-fields/slt-cf-init.php on line 455
My profile info still saves but I get a blank page with the error when doing so.
Let me know if you need any more info.
Thanks,
Jonah
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Since WordPress has Farbtastic included as default, are there any plans to add a custom colour picker type to the plugin? Would that be difficult to do for any reason?
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi,
I’m working on an event management system where I’d like to have a feature for creating agenda. Each subevent in the agenda needs a start time and end time. So, the date field is not enough. I’d either need a datetime field or/and a time field. Ihave a jquery ui extension https://trentrichardson.com/examples/timepicker/in mind.
Now, because the items in the agenda are not going to be fixd in number, I’d need to clone them on the fly.
So, I was hoping to hook a custom field type into the plugin called datetime and another called jsut time. Is that possible without modifying the core pluin as I’d like the client to be able to update the plugin.
Alos, looking into the code, I found that cloning is something already being worked on.
The third thing is that the gmap feature leaves a lot to be desired. So, I’m looking to use this: https://www.jsclasses.org/package/71-JavaScript-jQuery-plugin-to-create-Google-Maps.html instead.
My question is: my needs are urgent, so I will go ahead and implement some of these,. Can I get some support from you on this? And can I do that in a way that these can be contributed to the core?
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi Steve,
I’ve run into an interesting error when using a posts-populated select field. Once I create a new post in a custom post type, I get the following PHP warning:
First parameter must either be an object or the name of an existing class in /Applications/MAMP/htdocs/…/developers-custom-fields/slt-cf-init.php on line 409
I haven’t thoroughly tested yet, but I think the issue is that as the post has not yet been saved we don’t currently have a global $post set and so this function throws an error. It seems to be a fairly harmless error as the options_query is still displaying posts properly and I could easily suppress the it, but I thought it’d be worth while looking into, rather than attempting to cover-up the issue!
Cheers,
Olly
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>I am working with portfolio post type. I am adding meta field in page with template “page-portfolio.php”. I used the below code. but it is not working and meta box is displaying also on page with template other than “page-portfolio.php”.
'scope' => array('page','template'=> array( 'page-portfolio.php' ))
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi There,
I’m making use of gravity forms, and I need some of the custom fields I created with developers custom fields to show up in the default custom fields. Now in your documentation I read “An underscore at the start means these values won’t show up in the default WordPress custom fields meta box.”. I already used developers custom fields with the default prefix a lot, and would like to keep all those values the same, I just need them to show up under one custom post type / custom fields box. Is this possible? Thanks!
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi, I love this plugin!!
Any new features planned???
Thanks!!!
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi, please, I need some help.
I Have a user checkboxes custom field registered to use a Taxomony and is set to $Single= false. So I can check as many as I want.
I use this taxonomy also in my custom post type where my client can check one or many tags for each post.
So, what I need is to query all posts that has the same tags for each user. I have the code below:
if ( function_exists( 'slt_cf_register_box') )
add_action( 'init', 'register_my_custom_fields' );
function register_my_custom_fields() {
slt_cf_register_box( array(
'type' => 'post',
'title' => 'Dados do Arquivo',
'id' => 'dados-arquivo',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'ad_arquivorestrito',
'label' => 'Selecione o Arquivo',
'type' => 'file',
'file_button_label' => 'Selecionar arquivo',
'scope' => array( 'ad_arearestrita' ),
'capabilities' => array( 'edit_posts' )
)
)
));
slt_cf_register_box( array(
'type' => 'user',
'title' => 'Acesso as Concessionárias',
'id' => 'acesso-concessionaria',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'ad_acessoconcessionaria',
'label' => 'Acesso a:',
'type' => 'checkboxes',
'multiple' => true,
'options_type' => 'terms',
'options_query' => array( 'taxonomies' => 'ad_concessionaria', 'hide_empty' => false ),
'single' => false,
'scope' => array( 'administrator', 'admin', 'concessionaria', 'editor' ),
'capabilities' => array( 'edit_users' )
)
)
));
}
That’s working fine! I have a checkboxes in my User Profile with all tags I created in the Taxonomy “ad_concessionaria”.
Now I have the query below:
<?php
$args = array(
'post_type' => 'ad_arearestrita',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'ad_concessionaria',
'field' => 'id',
'terms' => $current_user->_slt_ad_acessoconcessionaria
)
)
);
$query = new WP_Query( $args );
while($query->have_posts()) : $query->the_post();
?>
That’s working fine, but is retrieving just one post, because is getting just ONE “term” from my User Custom Field…….
I can’t find a way to retrieve an Array of the values, since I use Checkboxes and I can have many tags in this field…..
Can you help me please??? How can I get an ARRAY of values to use in this Query?
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>Hi there, thanks for the great plugin first of all!
I’m trying to pull in a list of posts for a custom post type and I don’t get anything in my select field. Here’s my code:
function register_user_fields() {
slt_cf_register_box( array(
'type' => 'user',
'title' => 'Member Profile Page',
'id' => 'profile-page-options',
'context' => 'normal',
'priority' => 'high',
'fields' => array(
array(
'name' => 'profile-page',
'label' => 'Profile Page',
'type' => 'select',
'scope' => array( 'administrator', 'editor' ),
'capabilities' => array( 'edit_posts' )
)
),
'options_type' => 'posts',
'options_query' => array(
'posts_per_page' => -1,
'post_type' => 'member'
)
));
}
add_action('init','register_user_fields');
I’ve got a bunch of members added so there are posts there. Am I doing something wrong?
Thanks,
Jonah
https://www.ads-software.com/extend/plugins/developers-custom-fields/
]]>