<?php /** * Template Name: スレッド投稿フォーム */ get_header(); ?> <?php if(is_user_logged_in()): //Login check $user = wp_get_current_user(); ?> <?php //echo $title ?> <form action="<?php the_permalink();?>" method="post" enctype="multipart/form-data"> <?php // セッション処理 session_start(); require_once "functions/definition.php"; $content_txt = ""; ini_set("session.bug_compat_42", 0); ini_set("session.bug_compat_warn", 0); if(isset($_SESSION[TITLE])) $content_txt = $_SESSION[TITLE]; if(isset($_SESSION[CONTENT])) $content_txt = $_SESSION[CONTENT]; show_thread_error(); wp_nonce_field('create_thread'); ?> <table class="form-table"> <tbody> <tr> <th><label for="title">タイトル</label></th> <td><input id="title" type="text" name="title" value="<?php echo $title_txt; ?>" /></td> </tr> <tr> <th><label>画像</label></th> <td><input type="file" name="image" /></td> </tr> <tr> <th><label>カテゴリー</label></th> <td><?php wp_dropdown_categories(); ?></td> </tr> <tr> <th><label for="content">コメント</label></th> <td><textarea id="content" name="content"><?php echo $content_txt; ?></textarea></td> </tr> </tbody> </table> <p class="submit"><input type="submit" value="投稿する" /></p> </form> <?php else: //Login check else ?> <p><a href="<?php echo wp_login_url(get_permalink()); ?>">ログイン</a>してください。</p> <?php endif; //Login check get_footer(); ?>
でバックモードでやっているのですが、エラーが出ず真っ白な画面になってしまいます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/07/12 14:00
退会済みユーザー
2016/07/12 14:04 編集
2016/07/12 14:14
退会済みユーザー
2016/07/12 14:15
2016/07/12 14:16
退会済みユーザー
2016/07/12 14:17
退会済みユーザー
2016/07/12 14:18
2016/07/12 14:26
退会済みユーザー
2016/07/12 14:26
退会済みユーザー
2016/07/12 14:27
2016/07/12 14:37
退会済みユーザー
2016/07/12 14:38
2016/07/12 14:41
退会済みユーザー
2016/07/12 14:44 編集