Editing a Post, 99% CPU?

You may be dealing with the dreaded mod_security when your posting or updating . see if it’s enabled on the server first, if your using antimalware software it may be trying to scan on save . ok that’s the easy try . the next is to turn off your plugins . wsiwig editors., seo plugins … Read more

How to add multiple checkbox elements to media attachments?

Like @Bainternet said, it is the same thing. Taking the code from the question you linked to, you can do it like this: function filter_attachment_fields_to_edit( $form_fields, $post ) { $foo = (bool)get_post_meta( $post->ID, ‘foo’, true ); $bar = (bool)get_post_meta( $post->ID, ‘bar’, true ); $form_fields[‘foo’] = array( ‘label’ => ‘Is Foo’, ‘input’ => ‘html’, ‘html’ => … Read more

How to add “Check all” to Edit post page in WP?

try this- remove_meta_box(‘categorydiv’); add_meta_box(‘categorydiv’, “Categories”, ‘mycustom_category_meta_box’, null, ‘side’, ‘core’, array( ‘taxonomy’ => ‘category’ )); function mycustom_category_meta_box($post, $box) { $defaults = array(‘taxonomy’ => ‘category’); if ( !isset($box[‘args’]) || !is_array($box[‘args’]) ) $args = array(); else $args = $box[‘args’]; extract( wp_parse_args($args, $defaults), EXTR_SKIP ); $tax = get_taxonomy($taxonomy); ?> <div id=”taxonomy-<?php echo $taxonomy; ?>” class=”categorydiv”> <ul id=”<?php echo $taxonomy; … Read more

WordPress Post Editor Toolbar Missing

Make sure in your user Profile you have Visual Editor un-checked. Sometimes when migrating WordPress sites you may lose widget placement for some reason. I would also un-install and re-install any plugins. But moving from one host to another host when your domain URL has not changed is usually easy going. Can you take a … Read more

Hide content editor for posts after approriate date

function disable_editor_for_old_posts_wpse_101106($post) { if (strtotime(‘-2 months’) > strtotime($post->post_date)) { remove_post_type_support(‘post’,’editor’); } } add_action(‘add_meta_boxes_post’, ‘disable_editor_for_old_posts_wpse_101106′); I couldn’t find a great hook for this but add_post_meta_boxes_* is early enough, and it passes the $post object to the callback. Basically the filter checks the post on the post edit screen and removes post type support based on the … Read more

can’t see all pages in dashboard (can only see 3) /wp-admin/edit.php > 500 error

Please open your wp-config.php file and change the parameter like this: define(‘WP_DEBUG’, true); Once this parameter is activated, you can see more details about the error. Try to activate any default WordPress theme like TwentySeventeen and look if the error still exists. Update: function avia_backend_compatibility_custom_field_filter($custom_fields, $post_id) { if(empty($custom_fields)) { $custom_fields = array( ‘slideshow’ => array( … Read more

Using WPAlchemy metabox values in another metabox

Ok, I finally managed to solve that by myself. It is possible thanks to : Create the first field : <?php while($mb->have_fields_and_multi(‘types’)): $mb->the_group_open(); $mb->the_field(‘type’); ?> <input type=”text” id=”<?php $mb->the_name(); ?>” name=”<?php $mb->the_name(); ?>” value=”<?php $mb->the_value(); ?>” /> <a href=”#” class=”dodelete button”>Remove</a> <?php $mb->the_group_close(); endwhile; ?> <a href=”#” class=”docopy-types button” style=”float: left”>Add new</a> <a href=”#” class=”dodelete-types … Read more

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