Skip to content

Instantly share code, notes, and snippets.

View uandidezign's full-sized avatar

Carlos Montavlo uandidezign

View GitHub Profile
@uandidezign
uandidezign / Custom CPT Loop Short Code
Last active May 5, 2018 02:47
This code snippet will create an CTP loop that can be inserted in any page via a short code.
<?php
function custom_short_code(){
ob_start();
$paged = ( get_query_var('paged') == 0 ) ? 1 : get_query_var('paged');
$call_cpt = new WP_Query(array(
'post_type' => 'custom_post_type',