How to hide editor, but keep media library access

The media_upload_tabs filter passes a single argument containing an array of the tabs, you can unset() them to remove them. The array looks something like this: Array ( [type] => From Computer [type_url] => From URL => Gallery [library] => Media Library ) to remove the media library tab: function remove_media_library_tab($tabs) { unset($tabs[‘library’]); return $tabs; … Read more

Password protected uploaded PDF page

Try using the Advanced Custom Fields plugin: http://www.advancedcustomfields.com/ You can add a file(s) upload field to your “designs” post type, and hide the regular content editor. Then you can create a custom template for that post type that displays the files attached to the post.

How to retain HTML5 Attributes on Markup

It is enough to add unfiltered_html capability to Editor role. Add the following code into your current theme’s functions.php: function wpse_change_capability() { $role = get_role( ‘editor’ ); if ( ! $role->has_cap( ‘unfiltered_html’ ) ) $role->add_cap( ‘unfiltered_html’ ); } add_action( ‘init’, ‘wpse_change_capability’, 10 ); Login as the user with Editor role. Test it by editing any … Read more

Editor role isn’t seeing specific post type posts with only post_type parameter

What you need to do is to make custom user meta fields. Links these metafields to a custom category linked to your custom post type. Use this code for a checkbox feeling: <input type=”checkbox” id=”category-<?php echo $post_type->term_id ?>” <?php if($user_cats[0] && in_array( $post_type->term_id, $user_cats[0] )) echo ‘checked=checked’;?> name=”categories[]” value=”<?php echo $post_type->term_id;?>”/> Every custom category you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)