Add Custom Profile Field as Notes

it would be easier to create a custom post type Notes, than on a user page just get all notes of a specific author and than display them. By creating a custom post type you may easily create a interface and all saving/handling functions. If you would like to do it as a custom field … Read more

Convert attachment ID into url?

You need the function wp_get_attachment_image_src() see http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src In your code it would be something like: <?php foreach(get_field(‘connections’) as $relationship): ?> <?php $img = wp_get_attachment_image_src( get_post_meta($relationship->ID, ‘company_logo’, true ), ‘thumbnail’ ); ?> <img src=”https://wordpress.stackexchange.com/questions/40232/<?php echo $img[0]; ?>” width=”<?php echo $image_attributes[1]; ?>” height=”<?php echo $image_attributes[2]; ?>” /> <a href=”<?php echo get_permalink($relationship->ID); ?>”><?php echo get_the_title($relationship->ID) ?></a> <br /> … Read more

How to disable Edit Post and Allow only Custom Field?

You can remove post type support for the editor on a conditional basis. The following should work: add_action( ‘add_meta_boxes’, ‘wpse45113_remove_editor’ ); function wpse45113_remove_editor() { // change the capability and post type to whatever is appropriate if ( ! current_user_can( ‘install_plugins’ ) ) remove_post_type_support( ‘post’, ‘editor’ ); } I’m using add_meta_boxes because it fires not too … Read more

Only show when content added via custom field

This is really more of a PHP question than a WordPress question. But, based on this example code: <li><a href=”http://<?php echo the_field(‘helpline_url’); ?>” class=”tiptip web” title=”<?php echo the_field(‘helpline_url’); ?>” target=”_blank”><?php echo the_field(‘helpline_url’); ?></a></li> …it appears that the the_field() function returns a value (since you then echo that returned value. Thus, simply wrap the entire <li> … Read more