Add custom fields to a page template, admin side

You can do this via JavaScript rather easily. Here are the steps you need to take. I’ve created a sample (untested) script below as a proof-of-concept for you. Register your meta box add_action(‘add_meta_boxes’, ‘foo_page_template_meta_box’); function foo_page_template_meta_box(){ add_meta_box( ‘foo_page_template_options’, __(‘Foo Page Template Options’), ‘foo_page_template_options’, ‘page’ ); } function foo_page_template_options(){ //Your custom field form goes here } … 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

WP_editor problem

It doesn’t look like you’re calling add_action() correctly. It should be more like: add_action( ‘edit_page_form’, ‘wpse96952_editor’ ); function wpse96952_editor() { wp_editor( “Sample”, ‘mycontent’, array( ‘textarea_name’ => ‘mycontent’ ) ); } (content changed to mycontent after I read @vancoder’s comment)

Custom wp_editor doesn’t update post_content

After some searching and working off of some pointers from toscho, and some other helpful posts to avoid an infinite loop I managed to figure out a solution. I’ll post the code below then briefly explain: // Hook into the actions here public function __construct() { add_action( ‘add_meta_boxes’, array($this, ‘meta_boxes’ )); add_action( ‘save_post’, array($this, ‘save_bio_data’ … Read more

How Can i print the wp_editor field content?

OK, since you save these additional values as Custom Fields (see your code below): function save_points(){ global $post; update_post_meta($post->ID, “category”, $_POST[“category”]); update_post_meta($post->ID, “brand”, $_POST[“brand”]); update_post_meta($post->ID, “features”, $_POST[“features”]); update_post_meta($post->ID, “holds”, $_POST[“holds”]); update_post_meta($post->ID, “extra”, $_POST[“extra”]); } You should use [get_post_meta][1] to get these values.

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