Forum Replies Created
-
AuthorPosts
-
Bernhard Niemann
ParticipantYeah i will do this today or tomorrow, thank you for the help.
Bernhard Niemann
ParticipantYes, im using rwmb_meta().
Bernhard Niemann
ParticipantHello,
sorry for my late response. Please see the video. There you can see, that it isnt working, maybe because of tinymce.
https://streamable.com/extxx2Bernhard Niemann
ParticipantCreating the field:
function kie_jobs_aufgaben_metabox( $meta_boxes ) { $prefix = 'kie_'; $meta_boxes[] = array( 'id' => 'aufgaben', 'title' => esc_html__( 'Aufgaben', 'kie-stellenboerse' ), 'post_types' => array( 'jobs' ), 'context' => 'after_title', 'priority' => 'high', 'autosave' => true, 'fields' => array( array( 'name' => 'Aufgaben', 'id' => $prefix . 'aufgaben', 'type' => 'wysiwyg', 'add_to_wpseo_analysis' => true, 'class' => 'kie_metabox_textarea', 'raw' => false, 'options' => array( 'textarea_rows' => 4, 'teeny' => true, ), ), ), ); return $meta_boxes; }Updating Post Meta:
update_post_meta($post_id, 'kie_aufgaben', wp_kses_post($aufgaben), false);Bernhard Niemann
ParticipantYes I know how to do this, but if I add raw html code by php like this:
add_post_meta($post_id, 'kie_arbeitsort_front', $arbeitsort, false);it is not possible to add raw html content. It always save the html content as normal text, which leads to the content to be saved as something like this:
Bernhard Niemann
ParticipantThanks for the fast reply. You can close this topic. I found what was causing the error - it was not meta box!
Thank you!
-
AuthorPosts