Edit part of a post

The way WordPress is built now doesn’t really allow for that. The post content is all in one block in the database – one, continuous database field. While you might be able to break out sections of it by adding specific markup, you’ll still end up parsing the entire content to extract just that section. … Read more

Dynamic WordPress editor in meta box

The problem is that the wp_editor() automatic load the scripts and this is not possible dynamic. You must enhance your plugin, code and add the scripts also dynamic or via ajax. WP include the scripts and styles via wp_enqueue_script() and this is not usable in a dynamic change of DOM, it was registered for better … Read more

Force WP to ignore multiple whitespaces

Not aware of a global setting to do this but you have a few options. Use add_filter( ‘the_content’, ‘filter_function_name’ ) and replace the double spaces. Generally a bad idea because you’d have to account for the valid use of double spaces. Install a plugin like ‘After the Deadline’ or similar that shows spelling and typo … Read more

Function to add custom HTML into head in custom post-type list page

If its okey you can hook into admin_notices. Like this: Change post_type to the real post_type name.. I assumed it would be “program”. function wpse_76471_add_html() { global $pagenow ,$post; if( $post->post_type == ‘program’ && $pagenow == ‘edit.php’ ) { $output=”<div class=”my-div”>”; $output .= ‘<h2>’. __(‘My custom content (HTML/PHP)’, ‘program’) .'</h2>’; $output .= ‘</div>’; echo $output; … Read more

Role based permission edit for plugins

I think the plugin include the possibility with one check for rights, for a capability. You see in the source of the plugin, that he include the menu items, if the user have the capability edit_theme_options. That makes not so easy for you to change this in different roles. You can create custom roles, like … Read more

Why Editor reformats my code

I suggest you to use htmlspecialchars() before sending content andhtmlspecialchars_decode() before showing content on page, here is functions that you need to copy/paste to your functions.php : function wp_po9568($content) { return htmlspecialchars($content); } add_filter(‘content_save_pre’,’wp_po9568′); And: function wp_po5689($content) { return htmlspecialchars_decode($content); } add_filter( ‘the_content’,’wp_po5689′); WordPress by default comments out php tags.

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