Tag Info

New answers tagged

0

You have to filter user_has_cap and compare the user meta fields. The following code is based on this answer and not tested. add_filter( 'user_has_cap', 'wpse_99393_filter_cap', 10, 3 ); /** * Allow editing others posts only for editors from the same school. * Administrators can still edit those posts. * * @wp-hook user_has_cap * @param array ...


0

Yessss, I fixed the problem, i needed to apply a filter into the get_post_meta to make it work. <?php echo apply_filters( 'the_content', get_post_meta($post->ID, '_wenc_content_inhoud', true)); ?> Thanks anyway!


4

There is a filter named default_content. It does exactly what the name says. :) Example: add_filter( 'default_content', 't5_preset_editor_content', 10, 2 ); /** * Fills the default content for post type 'post' if it is not empty. * * @param string $content * @param object $post * @return string */ function t5_preset_editor_content( $content, $post ) ...


0

A possible solution is to use jquery to show/hide your custom field, something like this: <script> jQuery(document).ready(function($) { $('#yourcheckboxidentifier').click(function() { $('#customfieldidentifier').fadeToggle(400); }); if ($('#yourcheckboxidentifier').val() !== undefined) { ...



Top 50 recent answers are included