Skip to content

Instantly share code, notes, and snippets.

View 0v3rth3d4wn's full-sized avatar

Ivo Karadzhov 0v3rth3d4wn

View GitHub Profile
<?=implode( ' / ', array_map( function( $term ) { return '<a href="' . get_term_link( $term, 'category' ) . '">' . get_term( $term, 'category' )->name . '</a>'; } , wp_list_pluck( get_the_terms( $article->ID, 'category' ), 'term_id' ) ));?> /<?php _e( 'by', 'premitheme' );?> <a href="<?=get_author_posts_url( $article->post_author );?>"><?php the_author_meta( 'display_name', $article->post_author ); ?></a>
{
"id": 2,
"listing_id": "08255435",
"agent_id": "X49052",
"status": "P ",
"city": "Los Angeles",
"state": "CA",
"zip": 90006,
"country_code": "US",
"price": "530000.0",
@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