Skip to content

Instantly share code, notes, and snippets.

<?php
//Creating the content for the Single Post
function remove_single_post() {
remove_action('thematic_singlepost', 'thematic_single_post');
}
add_action('init', 'remove_single_post');
function pickle_single_post() {
global $post;
?><div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class();?>">
<?php
add_meta_box( 'new-meta-boxes', 'Place the Title For Your Custom Panel Here',
'new_meta_boxes', 'post', 'normal', 'high' );
?>
<?php
function new_meta_boxes() {
//this function creates the html of your inputs
}
function create_meta_box() {
//this function puts the data on your dashboard page
}
function save_postdata( ) {
//this function saves the data to your database
}
<?php
$new_meta_boxes =
array(
"input-one" => array(
"name" => "input-one",
"title" => "example one of a basic text input",
"description" => "This is where you enter your description for input-one.
It will display beneath the text input."),
"input-two" => array(
"name" => "input-two",
<?php
$new_meta_boxes =
array(
"input-one" => array(
"name" => "input-one",
"title" => "example one of a basic text input",
"description" => "This is where you enter your description for input-one.
It will display beneath the text input."),
"input-two" => array(
"name" => "input-two",
<?php
$new_meta_boxes =
array(
//your array will go here
);
?>
<?php
/*
Plugin Name: Custom Write Panel
Plugin Adaptation: Simplified and commented by Jonathan Greenblatt
Coppied from: Gallery a Child Theme of Thematic by Chris Wallace
Chris Wallace URI: http://www.chris-wallace.com/
Gallery URI: http://themeshaper.com/gallery-theme-thematic/
Original Plugin URI: http://wefunction.com/2008/10/tutorial-create-custom-write-panels-in-wordpress
//Creating the content for the Single Post
function remove_single_post() {
remove_action('thematic_singlepost', 'thematic_single_post');
}
add_action('init', 'remove_single_post');
function pickle_single_post() {
global $post;
?><div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class();?>">
<ul>
global $post;
?><div id="post-<?php the_ID(); ?>" class="<?php thematic_post_class();?>"> <?php
if(get_post_meta($post->ID, 'input-one')){
echo get_post_meta($post->ID, 'input-one', $single = true);
}
if(get_post_meta($post->ID, 'input-two')){
echo get_post_meta($post->ID, 'input-two', $single = true);