hunk
Forum Replies Created
-
Hi Eos Rose
if(!function_exists('contributor')){ function contributor(){ global $post; $Contributors = get_group('Contributor'); foreach($Contributors as $Contributor){ //change this line if( in_array('Artist',array_values($Contributor['contributor_role']) ) ) { echo $Contributor['contributor_name'][1]; } } } }Hi, what is your name of field?
Forum: Plugins
In reply to: Magic Fields: Duplicate Fields within Duplicate Groups<?php $mygroup = get_group('GroupName'); // use the Custom Group name foreach($mygroup as $group) { ?> <h1><?php echo $group['normal_field_name'][1]; // display a title for the group using a non-duplicated field ?></h1> <?php if( isset($group['duplicated_field_name']) ){ for( $gruop['duplicated_field_name'] as $field){ ?> <p><a href="<?php echo get_permalink($field); ?>" title="<?php echo get_the_title($field); ?>"><?php echo get_the_title($field); ?></a></p> <?php } } ?> <?php } ?>Forum: Plugins
In reply to: Magic Fields: Duplicate Fields within Duplicate Groupsget_group return an array with all of the fields in a group, the array has the following structure:
[id_group][name_of_field][id_field]foreach($mygroup as $group) {
if( isset($group[‘duplicated_field_name’]) ){
for( $gruop[‘duplicated_field_name’] as $field){
//print the permalink
}
}
}Forum: Plugins
In reply to: [Magic Fields 2] [Plugin: Magic Fields 2] File Upload Renames Filethis procedure is to not overwrite files,
you can edit this file https://github.com/magic-fields-team/Magic-Fields-2/blob/master/admin/mf_upload.php line~75
Forum: Plugins
In reply to: [Magic Fields 2] [Plugin: Magic Fields 2] Add Autocompleter to Magic Fieldscool, thanks
Forum: Plugins
In reply to: Magic Fields – Adding Image attributes in a groupcheck the params of get_image [1]
echo get_image('featured_image', $field, 1 , 1 , NULL , $feature_args);or gen_image [2]
gen_image('featured_image', $field, 1 , $feature_args);[1] http://wiki.magicfields.org/doku.php?id=front-end_functions#get_image
[2] http://wiki.magicfields.org/doku.php?id=front-end_functions#gen_imageForum: Plugins
In reply to: [Magic Fields] [Plugin: Magic Fields] Duplicate Fields LimitNo, this is not possible
Forum: Plugins
In reply to: Problem loading Supersized Images with Magic Fieldsin MF 2.x is get_order_group http://wiki.magicfields.org/doku.php?id=front-end_functions_v20#get_order_group , in MF 1.x is getGroupOrder http://wiki.magicfields.org/doku.php?id=front-end_functions#getgrouporder
Forum: Plugins
In reply to: Problem loading Supersized Images with Magic Fieldsthe param of get_order_group is a name any of the fields of group
slides: [// Slideshow Images <?php $slides = get_order_group('supersized_slide_image'); foreach($slides as $slide){ ?> {image : '<?php echo get('supersized_slide_image', $slide) ?>', title : '<?php echo get('supersized_slide_caption', $slide) ?>'}<?php } ?> ]Forum: Plugins
In reply to: [Magic Fields] [Plugin: Magic Fields] not working with chromeAny error of javascript?
MF2 is based on post types, post types do not have this option http://codex.wordpress.org/Function_Reference/register_post_type
Hi, in get_image check param $tag_img,
http://wiki.magicfields.org/doku.php?id=front-end_functions_v20#get_image
echo get_image(‘photo_gallery_image’,$my_group,$field_index,0); //this return the path of thumbnail
Forum: Plugins
In reply to: [Magic Fields 2] Using Magic Fields 2 Template Functions with Ajax Callsadd mf_front_end.php file,
require_once( ‘../../../path/of/magic/fieldsd/mf_front_end.php’ );
Hi the problem is that wordpress does not have a function to all types of supports available.
WordPress store the support in a global var ( $_wp_post_type_features ) something like this
array( [post] => Array ( [title] => 1 [editor] => 1 [author] => 1 [thumbnail] => 1 [excerpt] => 1 [trackbacks] => 1 [custom-fields] => 1 [comments] => 1 [revisions] => 1 [post-formats] => 1 ) [page] => Array ( [title] => 1 [editor] => 1 [author] => 1 [thumbnail] => 1 [page-attributes] => 1 [custom-fields] => 1 [comments] => 1 [revisions] => 1 ) );You can add support for add_meta_box function