2
I need to use Custom Post Types and learned how to do in this article.
There is one however, this article does not teach how to insert Custom Post Types into Pages or how to leave the <textarea>
in the Wysiwyg format.
What I need:
Let him the
textearea
in Wysiwyg and still determine the height sizeheight
. Example:100px
, I don’t want it big, because it will be written little thing, and are 3 text box.Remove the main Content, or better leave only the Custom Post Types, remove the textearea that Wordpress already comes by default.
functions.php code used to include Custom Post Types on Pages:
add_action("admin_init", "admin_init");
function admin_init(){
add_meta_box("credits_meta", "Design & Build Credits", "credits_meta", "page", "normal", "low");
}
function credits_meta() {
global $post;
$custom = get_post_custom($post->ID);
$designers = $custom["designers"][0];
$developers = $custom["developers"][0];
$producers = $custom["producers"][0];
?>
<p><label>Designed By:</label><br />
<textarea cols="50" rows="5" name="designers"><?php echo $designers; ?></textarea></p>
<p><label>Built By:</label><br />
<textarea cols="50" rows="5" name="developers"><?php echo $developers; ?></textarea></p>
<p><label>Produced By:</label><br />
<textarea cols="50" rows="5" name="producers"><?php echo $producers; ?></textarea></p>
<?php
}
I even found the code to insert a text box in Wysiwyg, but how can I adjust the height?
$content = '';
$editor_id = 'mycustomeditor';
wp_editor( $content, $editor_id );
Even if this link is a good suggestion, this reply will not be valid if one day the link ceases to work. So, and also because it’s important for the community to have content right here, you’d better respond with more complete answers. Can you elaborate more your answer? A summary of the content of the link would help a lot! Learn more on this item in our Community FAQ: Answers that only contain links are good?
– Math