Skip to content

Instantly share code, notes, and snippets.

View 0v3rth3d4wn's full-sized avatar

Ivo Karadzhov 0v3rth3d4wn

View GitHub Profile
@0v3rth3d4wn
0v3rth3d4wn / save_and_add_new
Created May 29, 2014 06:52
Save and add new post
/**
* Publish and go to add new post or CPT
* @param int $post_id The Post id
* @return void
*/
function save_and_new( $post_id ) {
$cpt = ( $_POST['post_type'] !== 'post') ? $_POST['post_type'] : false;
if ( isset( $_POST['publish'] ) || isset( $_POST['save'] ) ) {
<?php
/*
Plugin Name: Custom Post Type Archive Menu Links
Plugin URI: http://codeseekah.com/2012/03/01/custom-post-type-archives-in-wordpress-menus-2/
Description: Easily Add Custom Post Type Archives to the Nav Menus
Version: 1.0
Author: soulseekah
Author URI: http://codeseekah.com
License: GPL2