招聘信息显示


Job posted message displaying

我需要在用户提交表单后在同一页面上显示文本消息"您的工作发布等待审查"。任何帮助都会很感激。下面是模板中的代码:

                <?php
                    if( isset( $_GET['action'] ) && $_GET['action'] == 'edit' ){
                        $button_text = __( 'Update Job', 'jobboard' );
                ?>
                    <input type="hidden" name="form_type" id="form_type" value="edit_post_job" />
                    <input type="hidden" name="post_id" id="post_id" value="<?php echo esc_attr( $default['post_id'] ); ?>" />
                <?php
                    }else{
                        $button_text = __( 'Post A Job', 'jobboard' );
                ?>
                    <input type="hidden" name="form_type" id="form_type" value="post_job" />
                <?php
                    }
                ?>
                <input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr( get_current_user_id() ); ?>" />
                <button type="submit" name="submit" class="btn btn-post-resume"><?php echo esc_attr( $button_text ); ?></button>
            </form>
        </div><!-- /.col-md-8 -->
        <?php get_sidebar(); ?>
    </div><!-- /.row -->
</div><!-- /.container -->

用querystring重定向你的url,然后在你的页面中get和echo querystring

$msg="Project Detail succesfully Submit";
header("location: index.php?msg=Project Detail succesfully Submit");
 <h3><strong> <?php echo $_GET['msg'];?></strong> </h3>

在隐藏的for字段中,使用这个逻辑<>之前& lt; ?全球wp美元;$current_url = home_url(add_query_arg(array(),$wp->request));祝辞;
?action=edit&success=1"/>

裁判:http://cubiq.org/front-end-user-registration-and-login-in-wordpress

如果成功,那么它将重定向到"redirect_to",否则它将显示到错误页面。因此,在您的主题中,通过$_GET['success'] == 1获取值,然后打印您的自定义消息